Change Block Icon and Port Labels
To change the icon appearance of your block, you must add specific methods to your
System object™. For example, to define port labels, implement getInputNamesImpl
and getOutputNamesImpl
.
To define the icon, implement the
getIconImpl
method.To define the port labels, implement
getInputNamesImpl
to change the input andgetOutputNamesImpl
to change the output port labels.
If you do not implement these methods, by default the System object uses the input and output port names from the
stepImpl
method. If you are using nondirect feedthrough, by
default the System object uses the input names from updateImpl
and
the output port names from outputImpl
.
Modify MATLAB System Block Dialog
You can change the MATLAB System block dialog in two ways.
Implement the
getPropertyGroupsImpl
method in the System object code of the MATLAB System block. Inside the method, implement the following classes.Description matlab.system.display Method Define header text for property group.
Group properties together.
Group properties into a separate tab.
Use the Mask Editor user interface. For more information, see Customize System Object Dialog Box Using Mask Editor.
Change the MATLAB System Block Icon to an Image
You can change the image of MATLAB System block in MATLAB® Editor. For a list of accepted image files, see image
. To use an existing image
file for the MATLAB System block:
Double-click your MATLAB System block.
In the block dialog box, click the Source code. The MATLAB Editor that contains the System object code opens.
In the MATLAB Editor, from the System Block drop-down list, select Add Image Icon.
In the Add image icon dialog window, click Browse to select an image of your choice.
Click OK to insert the corresponding code for the
getIconImpl
method in your System object.
For more information, see Customize System Block Appearance.