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!