如何在Matlab的AppDesigner中设置表的大小?

问题描述

我正在尝试在appdesigner中构建100 * 100表,就像在Matlab命令中的uitable(figure,100,100)一样 但是在appdesigner中,我无法设置表格的大小。我非常需要帮助修复它。谢谢

解决方法

您可以在图形的startupFcn回调中更改表的大小。

% Initialize the table to have 100 rows and 100 columns
% Each Row-Column cell can also be initialized with real data
app.UITable.Data = cell( 100,100);

% Specify the row and column names,100 x 1 cell {'Col 1','Col 2',... }
app.UITable.ColumnName = {};
app.UITable.RowName = {};