Hi,
I have a 1 x 30 cell, A. Each element of A is a 1 x 10 double. How can I convert this to a 30 x 10 double, where each row is an element of cell A?
Any help would be appreciated! Thanks,
Sushma

1 comentario

sushma sharma
sushma sharma el 28 de Sept. de 2016
cell2mat gives me a 1 x 300 double...how can i get it to be a 30 x 10 double...

Iniciar sesión para comentar.

 Respuesta aceptada

Star Strider
Star Strider el 28 de Sept. de 2016

0 votos

See if the cell2mat function will do what you want.

2 comentarios

Star Strider
Star Strider el 28 de Sept. de 2016
sushma sharma’s Comment is duplicated here:
cell2mat gives me a 1 x 300 double...how can i get it to be a 30 x 10 double...
Star Strider
Star Strider el 28 de Sept. de 2016
Transpose your cell array first:
double_matrix = cell2mat(cell_array');
This uses the transpose operator (').

Iniciar sesión para comentar.

Más respuestas (1)

Image Analyst
Image Analyst el 28 de Sept. de 2016

0 votos

Star's answer gives you a double matrix. If you really want a "table" (if you even know what that is), use the function cell2table().

Categorías

Más información sobre Data Type Conversion en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 28 de Sept. de 2016

Respondida:

el 28 de Sept. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by