Need help with uitable data input ... Urgent help is appreciated
古いコメントを表示
i am getting a data in a variable which is like below
Value = {{2.000,2.000,0.797,1.000,1.000,1.000,1.000,1.000},{2.000,2.000,0.797,1.000,1.000,1.000,1.000,1.000},{2.000,2.000,0.797,1.000,1.000,1.000,1.000,1.000},{2.000,2.000,0.797,1.000,1.000,1.000,1.000,1.000},{2.000,2.000,0.797,1.000,1.000,1.000,1.000,1.000},{2.000,2.000,0.797,1.000,1.000,1.000,1.000,1.000},{2.000,2.000,0.797,1.000,1.000,1.000,1.000,1.000},{2.000,2.000,2.203,2.203,2.203,1.500,1.102,1.102},{2.000,2.000,0.797,1.000,1.000,1.000,1.000,1.000},{2.000,2.000,0.797,1.000,1.000,1.000,1.000,1.000}}
Actually this is a 2D table as shown in the below snap

which i am getting from function callback , i want to transfer this value to uitable but it accepts only cell array . HOw can i show the above table in gui uitable.
I am new to matlab so that is why i am asking this question.
thanks in advance.
2 件のコメント
What code are you using and what error are you getting? This is a cell array, although if it has a regular definition of equal numbers of rows and columns it really shouldn't be defined in even one cell array, let alone nested cell arrays.
If you can I would advise putting your data straight into a numeric array in the first place if it has such a regular structure.
Also, don't put 'Urgent' in a question title. Everyone's work is urgent to them, but not to anyone else. People help as and when they find the time and usually I ignore any questions that include words like "urgent" and I know it annoys many other regulars too.
Anjay Prasad
2016 年 11 月 11 日
編集済み: Walter Roberson
2016 年 11 月 11 日
採用された回答
その他の回答 (1 件)
Adam
2016 年 11 月 11 日
data = cell2mat( cellfun( @(x) cell2mat( x )', Value, 'UniformOutput', false ) )';
would convert your data into a numeric array if you really can't just put it in one in the first place. Then you should just be able to pass this to uitable.
カテゴリ
ヘルプ センター および File Exchange で MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!