function A = AddCorner(A1,A2)
% A1 is an m1-by-n1-by-3 uint8 color array that corresponds to an image I1
% A2 is an m2-by-n2-by-3 uint8 color array that corresponds to an image I2
% Assume m2<=m1 and n2<=n1
% A is an m1-by-n1-by-3 uint8 color array that corresponds to an image
% that is obtained by placing I2 in the upper left corner of I1.
A = A1;
[m2,n2,z] = size(A2);
for i=1:m2
for j=1:n2
A(i,j,1) = A2(i,j,1);
A(i,j,2) = A2(i,j,2);
A(i,j,3) = A2(i,j,3);
end
end