 <p>Combining the images can be done easily using <a href="http://www.mathworks.com/help/techdoc/math/f1-84864.html#f1-85019">concatenation</a>:</p> <pre><code>image3 = [image1 image2]; %# Concatenate horizontally </code></pre> <p>And you can then visualize <code>image3</code> using any of the functions <a href="http://www.mathworks.com/help/techdoc/ref/image.html">IMAGE</a>, <a href="http://www.mathworks.com/help/techdoc/ref/imagesc.html">IMAGESC</a>, or <a href="http://www.mathworks.com/help/toolbox/images/ref/imshow.html">IMSHOW</a>:</p> <pre><code>image(image3); %# Display the image in a figure window </code></pre> <p><br> <strong>NOTE:</strong></p> <p>You didn't mention what type of images you are dealing with, only that they are 2-dimensional matrices of pixel data. This means they could be <a href="http://www.mathworks.com/help/toolbox/images/f14-13543.html#f14-33397">binary images</a> (with pixel values of 0 or 1), <a href="http://www.mathworks.com/help/toolbox/images/f14-13543.html#f14-13941">grayscale images</a> (with pixel values that represent a range from black to white), or <a href="http://www.mathworks.com/help/toolbox/images/f14-13543.html#f14-17587">indexed color images</a> (with pixel values that represent indices into a colormap).</p> <p>For binary and grayscale images, the above solution should work fine. However, indexed color images could be trickier to combine if each image has its own unique <a href="http://www.mathworks.com/help/techdoc/ref/colormap.html">colormap</a>. If the image is loaded from a file using the function <a href="http://www.mathworks.com/help/techdoc/ref/imread.html">IMREAD</a>, you can get the color map like so:</p> <pre><code>[image1,map1] = imread('image1.png'); %# Image and colormap for image file 1 [image2,map2] = imread('image2.png'); %# Image and colormap for image file 2 </code></pre> <p>Now, if <code>map1</code> and <code>map2</code> contain different arrangements of colors, the two images can't be so easily combined. One solution would be to first convert the images to 3-dimensional <a href="http://www.mathworks.com/help/toolbox/images/f14-13543.html#f14-20224">truecolor images</a> using the function <a href="http://www.mathworks.com/help/techdoc/ref/ind2rgb.html">IND2RGB</a>, then combine them using the function <a href="http://www.mathworks.com.au/help/techdoc/ref/cat.html">CAT</a>:</p> <pre><code>image1 = ind2rgb(image1,map1); %# Convert image 1 to RGB image2 = ind2rgb(image2,map2); %# Convert image 2 to RGB image3 = cat(2,image1,image2); %# Concatenate the images along dimension 2 </code></pre> <p>And now you can view <code>image3</code> as described above.</p>