how to reshape cell array
185 views (last 30 days)
Show older comments
Meggie Hwang
on 19 Jan 2016
Commented: Meggie Hwang
on 19 Jan 2016
I have a 1x4620 cell array and every element is a 7x7x4 3D matrix. What should I do if I want convert this cell 1x4620 to 77x60 cell array.
2 Comments
Accepted Answer
Image Analyst
on 19 Jan 2016
Use reshape
newCa = reshape(ca, 77, 60);
The contents of the cell don't matter - they don't enter into it at all. See the FAQ: http://matlab.wikia.com/wiki/FAQ#What_is_a_cell_array.3F
2 Comments
Image Analyst
on 19 Jan 2016
P.S. A cell array take up an enormous amount of overhead memory as compared to a double array. You should consider just using a 4D array of doubles instead of a cell array.
More Answers (0)
See Also
Categories
Find more on Matrices and Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!