image
Display RGB image on masked subsystem icon
Syntax
image(a
) image(a
,position
) image(a
,position
,rotation
)
Description
image(
displays
the image a
)
, where a
is
an m-by-n-by-3 array of RGB
values. If necessary, use the MATLAB® commands a
imread
and ind2rgb
to
read and convert bitmap files (such as GIF) to the necessary matrix
format.
image(
creates
the image at the specified position as follows.a
, position
)
Position | Description |
---|---|
[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(
allows
you to specify whether the image rotates (a
, position
, rotation
)'on'
)
or remains stationary ('off'
) as the icon rotates.
The default is 'off'
.
Note
Images in formats .cur
, .hdf4
, .ico
, .pcx
, .ras
, .xwd
, .svg
(full
version) cannot be used as block mask images.
Examples
You can use different commands depending on your requirement to add an image. These commands can be added in the Icon & Ports pane of the Mask Editor dialog box.
Syntax | Description |
---|---|
image('icon.jpg') | Reads the icon image from a JPEG file named |
[data, map]=image('label.gif'); pic=ind2rgb(data,map); | Reads and converts a GIF file, |
image(pic) | Reads the converted label image. |
Version History
Introduced before R2006a