Put Two matrix into 1 column matrix

2 ビュー (過去 30 日間)
Phong Pham
Phong Pham 2013 年 10 月 14 日
回答済み: Azzi Abdelmalek 2013 年 10 月 14 日
Hi Everyone,
I have matrix X that has dimension of 100 x 3 and the same with matrix Y
X=[ x1 x2 x3; x1_1 x2_2 x3_3, etc];
Y=[ y1 y2 y3; y1_1 y2_2 y3_3, etc];
Now I want to convert it to this format
XY= [ x1;y1;x2;y2;x3;y3;x1_1;y1_1;x2_2;y2_2;x3_3;y3_3, etc]
Know that X and Y are 100 X 3 matrixes.
Thanks

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 10 月 14 日
X=X';
Y=Y';
XY=[X(:) Y(:)]'
XY=XY(:)

その他の回答 (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