フィルターのクリア

How to create a 3 dimensional matrix from two matrices each of 2 dimensions

2 ビュー (過去 30 日間)
DM
DM 2017 年 2 月 3 日
回答済み: James Tursa 2017 年 2 月 3 日
I have two matrices A and B each of dimension 4x110. I would like to create a 3 dimensional matrix C of dimension 4x2x110 which is filled by values from A and B. The second dimension is because we have two matrices A and B.

回答 (1 件)

James Tursa
James Tursa 2017 年 2 月 3 日
C = reshape([A;B],size(A,1),2,size(A,2));

カテゴリ

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