Squeeze fx for cell arrays?

20 visualizaciones (últimos 30 días)
Darin McCoy
Darin McCoy el 6 de Oct. de 2011
I have a cell array
temp_data <4x1 cell>
that contains
<1x3> cell
<1x3> cell
<1x3> cell
<1x3> cell
so - what i want is
temp_data <4x3 cell>
I would like to use 1-2 functions instead of a for loop. Any ideas? i tried squeeze but it doesnt work. Each individual cell contains a string of variable length.
This is what i get when i use cell2mat
??? Error using ==> cell2mat at 53 Cannot support cell arrays containing cell arrays or objects.

Respuesta aceptada

Laura Proctor
Laura Proctor el 6 de Oct. de 2011
temp_data = [ tempdata{:} ];
temp_data = reshape(temp_data,4,3)';

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