Multidimensional Array Conversion way

Is there any built in function or direct way to convert a 10 by 1e5 by 10 Array in to 100 by 1e5 array???

 採用された回答

Roger Stafford
Roger Stafford 2014 年 12 月 23 日

1 投票

A = reshape(permute(A,[1,3,2]),[],1e5);

1 件のコメント

Faisal Memon
Faisal Memon 2014 年 12 月 23 日
Thank you Roger Stafford, it works.

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

その他の回答 (1 件)

Guillaume
Guillaume 2014 年 12 月 23 日

1 投票

Use reshape:
in = rand(10, 1e5, 10);
out = reshape(in, 100, 1e5);

1 件のコメント

Faisal Memon
Faisal Memon 2014 年 12 月 23 日
Dear Guillaume,
Thanks for the answer. But this command changes the data. I don't see orderly data. In first page of in array there are 10 rows and 1e5 columns. Keeping the data in the same place i want to change the array of 10 by 1e5 by 10 to 100 by 1e5, which reshape does not perform.

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by