Transforming a multidimensional array to a two dimensional array?

16 vues (au cours des 30 derniers jours)
Phenomenal One
Phenomenal One le 22 Mar 2019
Commenté : Phenomenal One le 23 Mar 2019
Hi
I have a matrix Z which is multidimensional, that is Z can be thought of as an $N \times N$ matrix and it has $n$ copies of the matrix in the third dimension, so the dimension of the matrix Z is N x N x n. I just want to stack the matrices in the thrird dimension that is the stacks of 2D matrices from 1 to n side by side. so finally the new matrix will have the dimension N x (N*n).
I am trying to implement it in MATLAB using commands. may be using some commands does this efficiently.
Thanks for your help!.
  2 commentaires
KSSV
KSSV le 22 Mar 2019
Read about reshape
Phenomenal One
Phenomenal One le 23 Mar 2019
Thanks!!

Connectez-vous pour commenter.

Réponse acceptée

madhan ravi
madhan ravi le 22 Mar 2019
reshape( yourmatrix, [ N N*n ] )

Plus de réponses (2)

Matt J
Matt J le 22 Mar 2019

Mark Sherstan
Mark Sherstan le 22 Mar 2019
Check out reshape()

Catégories

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

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by