small matrix in big matrix

2 ビュー (過去 30 日間)
Ayob
Ayob 2013 年 6 月 2 日
I want to put a small matrix (p*q) called B into a bigger matrix (m*n) called A. How can I do it. Matrix B should be put on the left-right corner of matrix A.
  3 件のコメント
Walter Roberson
Walter Roberson 2013 年 6 月 2 日
the cyclist
the cyclist 2013 年 6 月 2 日
編集済み: the cyclist 2013 年 6 月 2 日
[Sorry. Couldn't resist teasing the master!]

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

採用された回答

the cyclist
the cyclist 2013 年 6 月 2 日
I don't know what "left-right corner" means, but in general you can do this as:
A = magic(7);
B = magic(3);
A(2:4,3:5) = B;

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by