Here we consider 2-D signals, e.g. images in practice. A nice source of images can be found at the University of Southern California. We shall concentrate on the two following images which are in TIFF format, i.e. uncompressed. Do not use the images on this page as they are in JPEG format; use rather the links below the image.
To display an RGB image that is stored internally in the variable imageData create a figure object if necessary and use the command
image(imageData); axis image % so that the image is scaled correctly
To display an grayscale image that is stored internally in the variable imageData with 256 levels of gray, create a figure object if necessary and use the command
colormap(gray(256)); image(imageData); axis image;
If the grayscale image does not fully cover the range of grays, use the imagesc command instead, which will display a more readable image (although not accurate)
colormap(gray(256)); imagesc(imageData); axis image;