App Designer UITable row names change once writing the output to the UITable

7 ビュー (過去 30 日間)
farzad
farzad 2020 年 4 月 30 日
コメント済み: Adam Danz 2020 年 5 月 1 日
Hi All
for a UITable I have create in app designer , I have also defined names for each rows :
R1,
R2,
R3,...
but once I finish the calculations and want to write these values to the UITable, this names change to numbers suddenly !!!
1,
2,
3,

採用された回答

Adam Danz
Adam Danz 2020 年 4 月 30 日
編集済み: Adam Danz 2020 年 5 月 1 日
Option 1: Create a table with row names and load the table into a uitable.
T = array2table(rand(3,2),'VariableNames',{'A','B'},'RowNames',{'i','ii','iii'});
uif = uifigure();
uitable(uif, 'Data', T)
Option 2: Create the uitable directly
uif = uifigure();
T = uitable(uif, 'Data',rand(3,2),'ColumnName',{'A','B'},'RowName',{'i','ii','iii'});
To update an existing app
app.UITable.Data = rand(3,2); % update data
app.UITable.ColumnName = {'A','B'};
app.UITable.RowName = {'i','ii','iii'};
  13 件のコメント
farzad
farzad 2020 年 5 月 1 日
Exactly ! I tried it as well, I think I learnt well from this question ,thank you
Adam Danz
Adam Danz 2020 年 5 月 1 日
Glad to hear it.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by