how in matrix insert other matrix
Show older comments
hi how in matrix insert other matrix? for example I have:
A=repmat(2, [6 6]);
B=repmat(1, [4 4]);
How I can insert B to A and get it:
A=
2 2 2 2 2 2
2 1 1 1 1 2
2 1 1 1 1 2
2 1 1 1 1 2
2 1 1 1 1 2
2 2 2 2 2 2
Accepted Answer
More Answers (1)
Ben Mitch
on 22 May 2011
0 votes
A(2:5,2:5) = B;
Categories
Find more on Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!