resize cell in different dimension

回答(1 个)

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 个评论

i want first 10 data in in first row and last 10 data in second row .

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Data Types 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by