How can I get one data(number) from a table to use it in a formula? I have a table with one column and I want to get for A= (value from 7. row and 1. column). (get(iutablename.'data' or indices. what?)

 채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 11월 11일

0 개 추천

d=get(uitableHandle,'data');
d7=d(7);

댓글 수: 4

laszlo csibrik
laszlo csibrik 2011년 11월 11일
Thx. I think it is working. but it I get error. where according the error message I dont have number in this cell. but it's a number of course... do you know what is the reason for this?
Walter Roberson
Walter Roberson 2011년 11월 11일
uitable stores things in a cell array, so
d7 = d{7,1};
Fangjun Jiang
Fangjun Jiang 2011년 11월 11일
@Walter, It's not true, Walter. If the data in the table is all numerical, it returns data array.
>> h=uitable('data',rand(3,4));
>> class(get(h,'data'))
ans =
double
laszlo csibrik
laszlo csibrik 2011년 11월 11일
now I get number but just in this way: d7=[d7(7,1)];
because the answer for this kind of bracket {} was it is not a non-cell array object... I'm just a basic user, but im happy to manage this finally :) and many thanks for your help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Tables에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by