convert a cell array to 3-d array

6 visualizaciones (últimos 30 días)
Xingang Bu
Xingang Bu el 19 de Mayo de 2020
Comentada: Xingang Bu el 19 de Mayo de 2020
Hi,
I have a cell A, the size is : 100*1, for each cell contail an image, the size is 1500*1500. I would like to convert the cell A to a 3 dimensional array B(100,1500,1500).
I don't want to use loop, it there good method? thank you very much!
Peter

Respuesta aceptada

Stephen23
Stephen23 el 19 de Mayo de 2020
B = permute(cat(3,A{:}),[3,1,2])
  1 comentario
Xingang Bu
Xingang Bu el 19 de Mayo de 2020
Thank you very much, your answer is great!
I tried cat before ,but failed due to wrong parameter.

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