How can i change a cell to an array?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Shannon Lim
el 10 de Mzo. de 2021
Comentada: Shannon Lim
el 10 de Mzo. de 2021
I have a 1000x1 cell consisting of 20x20x20 complex doubles.
How do i convert it such that its 1000x20x20x20?
Tried using cell2mat but ended up with 20000x20x20x20.
0 comentarios
Respuesta aceptada
KSSV
el 10 de Mzo. de 2021
C{1} = rand(2,2,2) ;
C{2} = rand(2,2,2) ;
C{3} = rand(2,2,2) ;
C{4} = rand(2,2,2) ;
A = cat(4,C{:}) ;
C{1}
A(:,:,:,1)
3 comentarios
KSSV
el 10 de Mzo. de 2021
If C is you cell array of dimension 1x1000 with each cell 20*20*20, you can use the shown code and get A as 20*20*20*1000
Más respuestas (0)
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!