How do i concatanate this two matrices even if they are not consistent .

3 ビュー (過去 30 日間)
Bita Andrei
Bita Andrei 2020 年 4 月 4 日
コメント済み: Bita Andrei 2020 年 4 月 4 日
A=[0 4 2;10 -2 -7;-7 2 3]; B=[-24 10 ];

採用された回答

Sriram Tadavarty
Sriram Tadavarty 2020 年 4 月 4 日
Hi Bita,
In general, inorder to concatenate two matrices any of the dimension must be the same. Like if number of rows are same, you can perform column concatenation and vice versa.
In your caae, A is a 3 x 3 matrix, and B is a 1 x 2 matrix. Inorder concatenate the both, you can make them both vectors and perform the concatenation. You can try C = [A(:); B(:)].
This performs the contention of both vectors provided.
Hope this helps.
Regards, Sriram

その他の回答 (0 件)

カテゴリ

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