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!