How to remove (or reshape) singleton dimensions in cell array?
Show older comments
Hi guys,
My question is about reshaping cell elements. Let say I have a cell array, named MyCell, that consist of 5 elements. The size of each element in MyCell array is different. MyCell is like:
MyCell = { [1x1x30 double] ; [1x1x25 double]; [1x1x22 double]; [1x1x34 double]; [1x1x38 double] }
I want to reshape each cell element and make them 2 dimentional like [30x1 double] etc.
MyCell = { [30x1 double] ; [25x1 double]; [22x1 double]; [34x1 double]; [38x1 double] }
Is it possible to do this with out using a for loop?
Is there any indexing tricks that can be used in reshape or squeeze functions ?
thank you guys
Accepted Answer
More Answers (0)
Categories
Find more on Loops and Conditional Statements 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!