Clear Filters
Clear Filters

Logical column in uitable

7 views (last 30 days)
hsi
hsi on 24 Dec 2018
Commented: hsi on 24 Dec 2018
I send a data (2 numeric columns, changeable number rows) to a uitable and I wish that the 3rd column will be logical so I can select data from it.
I already declare the 3rd column in GUIDE uitable to be editable but I get this error:
"Warning: Table data is not editable at this location."
I tried many things but still the error reoccurs. How can it be solved?
[mcolumn,ncolumn] = size(myInfo);
fColumn = logical(repmat(flase,[mcolumn,1]))
Ctemp = [myInfo, fColumn]
cellMyInfo = num2cell(myInfo);
columnform = {'numeric','numeric','logical'};
set(handles.outputTable,'data',cellMyInfo);
set(handles.outputTable, 'ColumnFormat', columnform);
set(handles.outputTable, 'ColumnEditable', [false, false, true]);
  2 Comments
Walter Roberson
Walter Roberson on 24 Dec 2018
flase ?? (In you repmat)
hsi
hsi on 24 Dec 2018
syntex error. Thanks

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 24 Dec 2018
[mcolumn,ncolumn] = size(myInfo);
fColumn = logical(repmat(false,[mcolumn,1]))
cellMyInfo = [num2cell(myInfo), num2cell(fColumn)];
columnform = {'numeric','numeric','logical'};
set(handles.outputTable, 'data', cellMyInfo);
set(handles.outputTable, 'ColumnFormat', columnform);
set(handles.outputTable, 'ColumnEditable', [false, false, true]);

More Answers (0)

Categories

Find more on Migrate GUIDE Apps 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!