フィルターのクリア

stack multidimensional matrices horizontally

7 ビュー (過去 30 日間)
androidguy
androidguy 2018 年 2 月 8 日
コメント済み: androidguy 2018 年 2 月 9 日
Hi everyone
I have a trivial question but a bit tricky to put into code. I have 10 multidimensional matrices each of size 3 x 3 x 30. What I want to do is horizontally stack each of the smaller 3 x 3 matrices from all 10 matrices and form 1 big multidimensional matrix.. so the final size should be like 3 x 30 x 30.
How can i do this?
Thanks,

採用された回答

Birdman
Birdman 2018 年 2 月 8 日
One approach
A=randi([1 5],3,3,30,10);%demo data
permute(reshape(A,3,30,30),[1 2 3])
  3 件のコメント
Birdman
Birdman 2018 年 2 月 9 日
Normally reshape would vertically concentenate your matrices. Permute helps me to do ot horizontally and [1 2 3] stands for swapping the 1st and 3rd dimensions.
androidguy
androidguy 2018 年 2 月 9 日
Got it. Thanks again.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by