How to set a column element from a text array in uitable GUI

9 ビュー (過去 30 日間)
mudix
mudix 2017 年 11 月 10 日
コメント済み: mudix 2017 年 11 月 15 日
I have a problem. I have created a Table, using Matlab GUI. And, in my uitable, I want to assign a column or a row elements from a text array in my m-file code. In my m-file, I created a array like;
a={'John';'Kevin';'Steffi'};
I have uploaded a picture which shows my situation and my simple gui application.
To sum up, I want to set 'Name' column's element to John, Kevin, Steffi; not all of them NaN.
Please, help me.

採用された回答

KL
KL 2017 年 11 月 10 日
Put all your table data in a cell array and then update them, not just one column.
data = {'John',12;'Kevin',46;'Steffi,23};
then if T is your uitable,
T.data = data;
  3 件のコメント
KL
KL 2017 年 11 月 10 日
data = [a num2cell(b)]
mudix
mudix 2017 年 11 月 15 日
Thanks

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by