Hi,
I have 2 matrix A and B which are different size, I would like to combine them together with A as the master to make a new matrix with consist of A and B. The way I want both matrix is merge through a location on both matrix. For example place Matrix A on Matrix B on certain location, Eg ‘8’ on Matrix A to Matrix B’s ‘22’ to result Matrix Merge.
A=[1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15]
A =
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
B=[13 14 15 20 27 21; 16 17 18 19 25 26; 21 22 23 24 25 23]
B =
13 14 15 20 27 21 16 17 18 19 25 26 21 22 23 24 25 23
Merge=[0 13 14 15 20 27 21 ; 1 2 3 4 5 25 26 ; 6 7 8 9 10 25 23 ; 11 12 13 14 15 0 0]
Merge =
0 13 14 15 20 27 21 1 2 3 4 5 25 26 6 7 8 9 10 25 23 11 12 13 14 15 0 0
Besides that, additional space will have value of 0. I'll use these method to merge 2 images where i have a location at both images which going to be used to control the location of merging.
Thanks;
Best Answer