App Designer | error when trying to make one logical cell equal another
2 ビュー (過去 30 日間)
古いコメントを表示
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!
0 件のコメント
回答 (1 件)
Mario Malic
2021 年 1 月 17 日
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
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Develop Apps Using App Designer についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!