resize cell in different dimension

i have a cell of size 20*1 . i want to convert them into 10*2 .

回答 (1 件)

James Tursa
James Tursa 2017 年 9 月 14 日
編集済み: James Tursa 2017 年 9 月 14 日

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 件のコメント

komal bharti
komal bharti 2017 年 9 月 14 日
i want first 10 data in in first row and last 10 data in second row .
James Tursa
James Tursa 2017 年 9 月 14 日
result = reshape(mycell,10,2).';

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeData Types についてさらに検索

タグ

質問済み:

2017 年 9 月 14 日

コメント済み:

2017 年 9 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by