MATLAB: Put sub images to full images (color and binary)

Image Processing ToolboxMATLABput sub images

I have sub color images (A1.jpg and A2.jpeg). How to write code using matlab to connect an image to A3.jpg image.
Likewise, from binary (A4.jpg and A5.jpg), how can I continue writing the code to A6.jpg?B4.jpg

Best Answer

a1 = imread('A1.jpg');
a2 = imread('A2.jpg');
a3 = vertcat(a1, a2);
imshow(a3)
This requires that A1 and A2 both have exactly the same number of columns. If not, then you need to define where you want the two images placed relative to each other.
Related Question