Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Can I set up several datas in one table, in GUI ?

1 回表示 (過去 30 日間)
pty0220
pty0220 2016 年 3 月 22 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Can I set up several datas in one table, in GUI ?
for example, a = [1,2,3] b = [4,5,6] c = [7,8,9]
in GUI table show
  • 1 2 3
  • 4 5 6
  • 7 8 9
another example
I want to write code like this
set(handles.uitable1(1,:) , 'data', a)
set(handles.uitable1(2,:) , 'data', a)
set(handles.uitable1(3,:) , 'data', a)
How can I do that ?? Is it impossible ?? if it is possible , Plz tell me right code

回答 (1 件)

Jan
Jan 2016 年 3 月 22 日
編集済み: Jan 2016 年 3 月 22 日
a = [1,2,3];
b = [4,5,6];
c = [7,8,9];
data = cat(1, a, b, c);
set(handles.uitable1, 'Data', data);
"set(handles.uitable1(1,:) , 'data', a)" is not meaningful, because it is no valid Matlab syntax (except if you have an array of uitables). So please explain what you want this command to do. Note, that we cannot guess the purpose of invalid code.
  3 件のコメント
Jan
Jan 2016 年 3 月 23 日
A table is rectangular. What do you want to appear in the 'empty' elements? Should the data appear as vectors in the table?
Please describe exactly, what you want to achieve.
pty0220
pty0220 2016 年 3 月 24 日
I want empty place to be empty,,,

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by