resize cell in different dimension
12 次查看(过去 30 天)
显示 更早的评论
i have a cell of size 20*1 . i want to convert them into 10*2 .
0 个评论
回答(1 个)
James Tursa
2017-9-14
编辑:James Tursa
2017-9-14
Assuming you mean you want to reshape the cell array itself, and not the contents of the cell array:
mycell = your 20x1 cell array
result = reshape(mycell,10,2);
Or if you wanted the results arranged differently in the rows, then maybe this is what you need:
mycell = your 20x1 cell array
result = reshape(mycell,2,10).';
2 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!