Transforming a multidimensional array to a two dimensional array?

30 ビュー (過去 30 日間)
Phenomenal One
Phenomenal One 2019 年 3 月 22 日
コメント済み: Phenomenal One 2019 年 3 月 23 日
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 件のコメント
KSSV
KSSV 2019 年 3 月 22 日
Read about reshape
Phenomenal One
Phenomenal One 2019 年 3 月 23 日
Thanks!!

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

採用された回答

madhan ravi
madhan ravi 2019 年 3 月 22 日
reshape( yourmatrix, [ N N*n ] )

その他の回答 (2 件)

Matt J
Matt J 2019 年 3 月 22 日

Mark Sherstan
Mark Sherstan 2019 年 3 月 22 日
Check out reshape()

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by