View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Figure to Simulink subsystem mask icon converter

4.5 | 3 ratings Rate this file 3 Downloads (last 30 days) File Size: 2.75 KB File ID: #28198 Version: 1.0
image thumbnail

Figure to Simulink subsystem mask icon converter


Paul (view profile)


Creates a mask icon for a Simulink subsystem from a given figure.

| Watch this File

File Information

Creates a mask icon for a Simulink subsystem from a given figure. This subsystem is masked with a ICON correspoding to lines in the figure. This is useful to illustrate the behaviour of the subsystem by a icon.

You can use the simplot command to create it from the actual output. See the documentation of simplot (doc simplot) for further info.

function fig2simulinkmaskicon(hFig,colors)

hFig - handle to a figure to be used (e.g. gcf)
colors - (OPTIONAL) colors for different lines.

Supported (default) colors: blue, red, green, magenta, yellow, cyan, black

Creates a simulink subsystem with a given mask
Prints out the Mask/Icon string in the command window.

h = figure; hold on;

Required Products Simulink
MATLAB release MATLAB 7.1.0 (R14SP3)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
07 Sep 2012 Mikhail

Mikhail (view profile)

Good one, thanks a lot!
I wish other plot elements (not just lines) were supported.

13 Dec 2010 Will Campbell

This is a handy utility for 2D plot conversion. However, it doesn't work so well with 3D or image plots though. You might want to rephrase the description to note this limitation. It would also be handy if the function would error out unless the figure is 2D.

Comment only
15 Jul 2010 Lukas Lansky

Actually works very nicely.

14 Jul 2010 Lukas Lansky

Contact us