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

 Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 11 de Nov. de 2011

0 votos

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

4 comentarios

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by