Show coordinates for a 2D point in a table cell
I’m working on a MATLAB app where I’m trying to dynamically record and show every mouse click on the UIAxes in a UItable.
My problem is that the table only shows "1×2 double" in the designated cell for the coordinates instead of the actual numbers.
Is this possible to fix or do I have to split them into two columns?
app.PointsTable.Data = table(‘Size’,[0 2],’VariableNames’, {‘Point’, ‘Coordinates’}, ‘VariableTypes’, {‘uint8’, ‘cell’});
function UIAxesButtonDown(app, event)
if 1
coordinates = app.UIAxes.CurrentPoint(1, 1:2);
numRows = size(app.PointsTable.Data, 1);
app.PointsTable.Data(numRows+1, 🙂 = {numRows+1, {[coordinates(1) coordinates(2)]}};
end
endI’m working on a MATLAB app where I’m trying to dynamically record and show every mouse click on the UIAxes in a UItable.
My problem is that the table only shows "1×2 double" in the designated cell for the coordinates instead of the actual numbers.
Is this possible to fix or do I have to split them into two columns?
app.PointsTable.Data = table(‘Size’,[0 2],’VariableNames’, {‘Point’, ‘Coordinates’}, ‘VariableTypes’, {‘uint8’, ‘cell’});
function UIAxesButtonDown(app, event)
if 1
coordinates = app.UIAxes.CurrentPoint(1, 1:2);
numRows = size(app.PointsTable.Data, 1);
app.PointsTable.Data(numRows+1, 🙂 = {numRows+1, {[coordinates(1) coordinates(2)]}};
end
end I’m working on a MATLAB app where I’m trying to dynamically record and show every mouse click on the UIAxes in a UItable.
My problem is that the table only shows "1×2 double" in the designated cell for the coordinates instead of the actual numbers.
Is this possible to fix or do I have to split them into two columns?
app.PointsTable.Data = table(‘Size’,[0 2],’VariableNames’, {‘Point’, ‘Coordinates’}, ‘VariableTypes’, {‘uint8’, ‘cell’});
function UIAxesButtonDown(app, event)
if 1
coordinates = app.UIAxes.CurrentPoint(1, 1:2);
numRows = size(app.PointsTable.Data, 1);
app.PointsTable.Data(numRows+1, 🙂 = {numRows+1, {[coordinates(1) coordinates(2)]}};
end
end uitable, cell MATLAB Answers — New Questions
​