App Designer | error when trying to make one logical cell equal another

1 view (last 30 days)
Hello,
Please assist with the below. Both are logical cells in a two different tables. I try to make one change as the other does in the UITablePlotHeadCellEdit function. I've read through multiple posts trying to solve this but don't understand what I'm doing wrong:
app.UITablePlotHead.Data{:,7}) == app.UITablePlotHead.Data(1,7)
For which my current error is:
Undefined function 'eq' for input arguments of type 'cell'.
Error in GraphingTemplate_Table12/UITablePlotHeadCellEdit (line 861)
if (app.UITablePlotHead.Data{1,7}) == true
Error using matlab.ui.internal.controller.uitable.WebMWTableController/fireCallbacksFromCellEdit (line 744)
Error while evaluating Table CellEditCallback.
Undefined function 'eq' for input arguments of type 'cell'.
Error in GraphingTemplate_Table12/UITablePlotHeadCellEdit (line 861)
if (app.UITablePlotHead.Data{1,7}) == true
Error using matlab.ui.internal.controller.uitable.WebMWTableController/fireCallbacksFromCellEdit (line 744)
Error while evaluating Table CellEditCallback.
I did try reading up on the warnings but couldn't successfully apply anything to my code.
I also tried:
if (app.UITablePlotHead.Data{1,7}) == true % {true} / 'true', I tried changing the brackets to parentheses, but nothing seems to work.
for i=1:length(fileList)
app.UITablePlots.Data(i,7) = {true};
end
Any guidance would be appreciated - thank you!

Answers (1)

Mario Malic
Mario Malic on 17 Jan 2021
Hey Connor,
When you assign data to UITable component, it'll remain the same variable type as original variable had. Therefore, in your case it'll be a numeric array, and you index into those using parantheses.
if app.UITablePlotHead.Data(3,7) % this will be true unless it equals to zero or it is empty
% code
end

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!