3D volume to 2D matrix conversion

I have a 3D matrix of size 20*22*815 . What is the way that i can generate 2D matrix of 815 rows and 440(20*22) columns

 採用された回答

Matt J
Matt J 2015 年 9 月 15 日

1 投票

A=permute(yourMatrix,[3,1,2]);
A=A(:,:);

1 件のコメント

Jab
Jab 2015 年 9 月 16 日
Thanks Matt

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

その他の回答 (1 件)

Hamoon
Hamoon 2015 年 9 月 16 日

0 投票

another possibility:
A = rand(20,22,815); % your matrix
B = reshape(A,440,815)';
The output of this code is equal to Matt's answer.
you can also use B=reshape(A,815,440) without using transpose, then B will be a 815*440 matrix, but the arrangement of data will be different. This is up to you what kind of arrangement you want.

1 件のコメント

Jab
Jab 2015 年 9 月 16 日
Thanks Hamoon

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

カテゴリ

製品

質問済み:

Jab
2015 年 9 月 15 日

コメント済み:

Jab
2015 年 9 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by