MATLAB: How to mosaic two images with out overlapping

mosaic images

I have a two images like this.as a example a=[1 1 1 1;1 1 1 1;1 1 1 1;1 1 1 1]; b=[0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0]; (actual images are 256*256) I want to obtain image c=[1 1 1 1 0 0 0 0;1 1 1 1 0 0 0 0;1 1 1 1 0 0 0 0;1 1 1 1 0 0 0 0]; how can i do this?( i want to do this with out damaging the original pixel values)

Best Answer

To stitch images together:
c = [a,b]; % horizontally
or
c = [a;b]; % vertically.