How to remove (or reshape) singleton dimensions in cell array?
古いコメントを表示
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
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!