フィルターのクリア

how to stack 2 dimensional arrays into 3 dimensional aarays?

73 ビュー (過去 30 日間)
Hassan Ashraf
Hassan Ashraf 2019 年 8 月 28 日
回答済み: Bruno Luong 2019 年 8 月 28 日
I have Nine(9) , 2-D arrays of size 3200x8.
I want to stack them into a 3D array so that I could have a final aaray of size 3200x8x9.
Please help!
  2 件のコメント
Alex Mcaulley
Alex Mcaulley 2019 年 8 月 28 日
See this: cat
Hassan Ashraf
Hassan Ashraf 2019 年 8 月 28 日
Concatenating arrays does not change dimenions it only concatenates arrays and matrices

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

採用された回答

Bruno Luong
Bruno Luong 2019 年 8 月 28 日
If 2D arrays are stored in 9 variables
cat(3,A1,A2,A3,A4,A5,A6,A7,A8,A9);
If they are stored in 1x9 cell C
cat(3, C{:});

その他の回答 (1 件)

darova
darova 2019 年 8 月 28 日
Use cat()
  4 件のコメント
Hassan Ashraf
Hassan Ashraf 2019 年 8 月 28 日
I have Nine, 2D arrays of dimesnions 3200x8, and I want them to change a single 3D array of size 3200x8x9.
Stephen23
Stephen23 2019 年 8 月 28 日
編集済み: Stephen23 2019 年 8 月 28 日
"I have Nine, 2D arrays of dimesnions 3200x8, and I want them to change a single 3D array of size 3200x8x9."
Sure, use cat.

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

カテゴリ

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