Effacer les filtres
Effacer les filtres

3D volume to 2D matrix conversion

1 vue (au cours des 30 derniers jours)
Jab
Jab le 15 Sep 2015
Commenté : Jab le 16 Sep 2015
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

Réponse acceptée

Matt J
Matt J le 15 Sep 2015
A=permute(yourMatrix,[3,1,2]);
A=A(:,:);
  1 commentaire
Jab
Jab le 16 Sep 2015
Thanks Matt

Connectez-vous pour commenter.

Plus de réponses (1)

Hamoon
Hamoon le 16 Sep 2015
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 commentaire
Jab
Jab le 16 Sep 2015
Thanks Hamoon

Connectez-vous pour commenter.

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by