imshow
Display image.
📝Syntax
imshow(filename)
imshow(img)
imshow(RGB)
imshow(img, [low high])
imshow(img, [])
imshow(img, map)
imshow(..., propertyName, propertyValue)
go = imshow(...)
📥Input Arguments
Parameter Description
filename row vector character: file name of the image to display.
img grayscale image: matrix.
RGB truecolor image: m-by-n-by-3 array.
[low high] grayscale image display range.
map colormap: c-by-3 matrix.
propertyName a scalar string or row vector character (for compatibility).
propertyValue a value (for compatibility).
📤Output Arguments
Parameter Description
go a graphics object: image type.
📄Description

imshow(img) displays the image im.

💡Examples
Display an RGB image.
f = figure();
n = 128;
x = linspace(0, 1, n);
[X, Y] = meshgrid(x, x);
rgb = cat(3, X, Y, 0.5 * ones(n, n));
h = imshow(rgb);
Example illustration
🔗See Also
imreadimageimagesccolormap
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub