Function Reference
— Function File: imshow (im)
— Function File: imshow (im, limits)
— Function File: imshow (im, map)
— Function File: imshow (rgb, ...)
— Function File: imshow (filename)
— Function File: imshow (..., string_param1, value1, ...)

Display the image im, where im can be a 2-dimensional (gray-scale image) or a 3-dimensional (RGB image) matrix.

If limits is a 2-element vector [low, high], the image is shown using a display range between low and high. If an empty matrix is passed for limits, the display range is computed as the range between the minimal and the maximal value in the image.

If map is a valid color map, the image will be shown as an indexed image using the supplied color map.

If a file name is given instead of an image, the file will be read and shown.

If given, the parameter string_param1 has value value1. string_param1 can be any of the following:

"displayrange"
value1 is the display range as described above.

Demonstration 1

The following code

  imshow (rand (100, 100));

Produces the following figure

Figure 1

Demonstration 2

The following code

  imshow (rand (100, 100, 3));

Produces the following figure

Figure 1

Demonstration 3

The following code

  imshow (100*rand (100, 100, 3));

Produces the following figure

Figure 1

Demonstration 4

The following code

  imshow (rand (100, 100));
  colormap (jet);

Produces the following figure

Figure 1