Borrar filtros
Borrar filtros

How to convert a cell array to a double array

5 visualizaciones (últimos 30 días)
Hina Iqbal
Hina Iqbal el 7 de Jun. de 2015
Comentada: Azzi Abdelmalek el 7 de Jun. de 2015
I have computed the data in the cell as [3x1 cell] but actually i do not want this type of data all i need is to get the data in the form of [3x1 double]....I need to know is there any way to convert from cell to double array.. Any help is appreciated

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 7 de Jun. de 2015
Editada: Azzi Abdelmalek el 7 de Jun. de 2015
v={1;2 ;3}
out=cell2mat(v)
  5 comentarios
Azzi Abdelmalek
Azzi Abdelmalek el 7 de Jun. de 2015
Also, you can't get
{4x1 double}
For your case it's
{5x1 double}
Azzi Abdelmalek
Azzi Abdelmalek el 7 de Jun. de 2015
b={{{3 ;4}; {1}; {5}; {2}};{{1;2}; {2}; {2}; {4}}}
d= cellfun(@(y) cell2mat(cat(1,y{:})),b,'un',0)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical 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