Error while calling reshape
Show older comments
Following is a cell array having size 1 X 180, is it possible to reshape this cell array size into 6*4, here 6 is column in one cell and 4 is sample of one image.
[36,50,3,0.578870350796391,0,1],[71,41,1,4.92191919817520,0,1]..........[38,74,3,3.21149279029833,0,1]
3 Comments
dzsuz87
on 17 Apr 2018
Could you give us more details? I'm not sure if you are talking about cell arrays, or regular arrays. And the end of your sentence is also unclear, what is your image here? By the way, 1*180 is not equal to 6*4.
For cell arrays containing only regular arrays of numbers, it is much more efficient and easier to use regular arrays.
Guillaume
on 17 Apr 2018
Any reshaping must preserve the number of elements in the array. Therefore it is never possible to reshape a 1x180 anything into a 6x4 of the same thing, since one has 180 elements while the other has only 24.
However, it sounds like you want something more complicated, possibly reshaping the matrices inside the cell array, but you've not explained that very clearly. Note that the size of a cell array and the size of whatever is inside the cell are two completely different things. You haven't told us what is inside each cell.
Balaji M. Sontakke
on 18 Apr 2018
Answers (0)
Categories
Find more on Logical 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!