small matrix in big matrix
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
the cyclist
2013-6-2
编辑:the cyclist
2013-6-2
Walter's comment here http://www.mathworks.com/matlabcentral/answers/77746-small-matrix-in-big-matrix duplicates Image Analyst's comment here: http://www.mathworks.com/matlabcentral/answers/77746-small-matrix-in-big-matrix.
[Sorry. Couldn't resist teasing the master!]
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!