Cell array in uitable

4 visualizaciones (últimos 30 días)
Lluis Roca
Lluis Roca el 14 de Oct. de 2013
Comentada: Azzi Abdelmalek el 14 de Oct. de 2013
Hi,
I have a cell array output, Value < 10x1 cell>, were each cell in the cell array contains a matrix element < 100x2 double>. Each row inside the matrix element is a set of X and Y coordinates.
How can I store each matrix element separately in a different uitable cell?
Thank.

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 14 de Oct. de 2013
If a is your cell array
b=cat(2,a{:})
x=b(:,[1 3])
y=b(:,[2 4])
  2 comentarios
Lluis Roca
Lluis Roca el 14 de Oct. de 2013
Thank but how do I store them in uitable?
Azzi Abdelmalek
Azzi Abdelmalek el 14 de Oct. de 2013
a={[1 2;3 4;5 6] [1 2;3 4;5 6]*10}
b=cat(2,a{:})
x=b(:,[1 3])
y=b(:,[2 4])
f=figure
headers={'x','y'}
h = uitable(f,'Data',[x(:) y(:)], 'ColumnName',headers);

Iniciar sesión para comentar.

Categorías

Más información sobre Programming en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by