Reshape a 2D matrix to a 3D matrix

3 ビュー (過去 30 日間)
hithere
hithere 2015 年 1 月 13 日
回答済み: Andrei Bobrov 2015 年 1 月 13 日
I have a (25 x 53515) matrix
I like to reshape it to 25 X 1 in the 2D domain so it will have 53515 layers in the 3D domain, thus forming a 25 x 1 x 53515 matrix.
How should I go about doing this?

回答 (1 件)

Andrei Bobrov
Andrei Bobrov 2015 年 1 月 13 日
reshape(yourarray,size(yourarray,1),1,[]);
other way
permute(yourarray,[1 3 2]);

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by