MATLAB Creating Graphical User Interfaces

(ff) #1

Table Array Data Types in App Designer Apps


NoteOnly App Designer apps and figures created with the uifigure function support
table arrays. For information on displaying table data in traditional figures, see
“Programmatic App that Displays a Table” on page 13-2.

Table arrays are useful for storing tabular data as MATLAB variables. For example, you
can call the readtable function to create a table array from a spreadsheet.

Table UI components, by contrast, are user interface components that display tabular
data in apps. Starting in R2018a, the types of data you can display in a Table UI
component include table arrays.

When you display table array data in apps, you can take advantage of the interactive
features for certain data types. And unlike other types of arrays that Table UI
components support, table array data does not display according to the ColumnFormat
property of the Table UI component.

Logical Data


In a Table UI component, logical values display as check boxes. true values are
checked, whereas false values are unchecked. When the ColumnEditable property of
the Table UI component is true, the user can select and clear the check boxes in the
app.

f = uifigure;
tdata = table([true; true; false]);
uit = uitable(f,'Data',tdata);

Table Array Data Types in App Designer Apps
Free download pdf