MATLAB: Convert a cell array to 3-d array

cell 2 array

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

Best Answer

B = permute(cat(3,A{:}),[3,1,2])
Related Question