I need to combine the two matrices a and b to yield c.
a = [1;0] and b = [0;1]
and for c I need to matrix to look like this c = [1,0;0,1] not [1;1]
I was using c = a + b, is there a way I can combine the matrices without adding the numbers together?
Thank you for your time.

1 件のコメント

Thomas
Thomas 2013 年 9 月 17 日
Nevermind, I forgot I could just stack them with c = [a,b]

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

 採用された回答

Andrei Bobrov
Andrei Bobrov 2013 年 9 月 17 日
編集済み: Andrei Bobrov 2013 年 9 月 17 日

1 投票

c = [a,b] % EDIT
Please read about concatenating arrays

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by