Display RGB image on masked subsystem icon


image(a, position)
image(a, position, rotation)


image(a) displays the image a, where a is an m-by-n-by-3 array of RGB values. If necessary, use the MATLAB® commands imread and ind2rgb to read and convert bitmap files (such as GIF) to the necessary matrix format.

image(a, position) creates the image at the specified position as follows.

[x, y, w, h]Position (x, y) and size (w, h) of the image where the position is relative to the lower-left corner of the mask. The image scales to fit the specified size.
'center'Center of the mask
'top-left'Top left corner of the mask, unscaled
'bottom-left'Bottom left corner of the mask, unscaled
'top-right'Top right corner of the mask, unscaled
'bottom-right'Bottom right corner of the mask, unscaled

image(a, position, rotation) allows you to specify whether the image rotates ('on') or remains stationary ('off') as the icon rotates. The default is 'off'.


The command


reads the icon image from a JPEG file named icon.jpg in the MATLAB path.

The following commands read and convert a GIF file, label.gif, to the appropriate matrix format. You can type these commands in the Initialization pane of the Mask Editor.

[data, map]=imread('label.gif');

Then type the command


in the Icon pane of the Mask Editor to read the converted label image.

See Also


Introduced before R2006a

Was this topic helpful?