MATLAB Creating Graphical User Interfaces

(ff) #1
Cells containing duration values are not editable in the running app, even when
ColumnEditable of the Table UI component is true.

Nonscalar Data


Nonscalar values display in the app the same way as they display in the Command
Window. For example, this table array contains 3-D arrays and struct arrays.

f = uifigure;
arr = {rand(3,3,3); rand(3,3,3)};
s = {struct; struct};
tdata = table(arr,s,'VariableNames',{'Array','Structure'});
uit = uitable(f,'Data',tdata);

A multicolumn table array variable displays as a combined column in the app, just as it
does in the Command Window. For example, the RGB variable in this table array is a 3-
by-3 array.

n = [1;2;3];
rgbs = [128 122 16; 0 66 155; 255 0 0];
tdata = table(n,rgbs,'VariableNames',{'ROI','RGB'})

tdata =

3×2 table

ROI RGB
___ _________________

1 128 122 16

15 Component Choices and Customizations

Free download pdf