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?)

 Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 11 Nov 2011

0 votes

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

4 commentaires

laszlo csibrik
laszlo csibrik le 11 Nov 2011
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 le 11 Nov 2011
uitable stores things in a cell array, so
d7 = d{7,1};
Fangjun Jiang
Fangjun Jiang le 11 Nov 2011
@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 le 11 Nov 2011
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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by