Simulink Reference Previous page   Next Page
image

Display an image on the icon of a masked subsystem

Syntax

image(a, [x, y, w, h])

image(a, [x, y, w, h], rotation)

Description

image(a) displays the image a where a is an M-by-N-by-3 array of RGB values. You can use the MATLAB commands imread and ind2rgb to read and convert bitmap files (such as GIF) to the necessary matrix format.

image(a, [x, y, w, h]) creates the image at the specified position relative to the lower left corner of the mask.

image(a, [x, y, w, h], rotation) allows you to specify whether the image rotates ('on') or remains stationary ('off') as the icon rotates. The default is 'off'.

Examples

This command

reads the icon image from a TIFF file named icon.tif 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.

Then type the command

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

See Also


Previous page  fprintf patch Next page

© 1994-2005 The MathWorks, Inc.