Change Block Icon and Port Labels
You can customize the MATLAB System icon and dialog box.
From R2023b, you can use the Mask Editor to design a MATLAB System icon and dialog box. You can also migrate existing mask customizations to the Mask Editor. This capability eliminates the need to develop or maintain methods in a System object™ file. For more information, see Customize MATLAB System Icon and Dialog Box Using Mask Editor.
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
the output port names from
Modify MATLAB System Block Dialog
You can change the MATLAB System block dialog in two ways.
getPropertyGroupsImplmethod in the System object code of the MATLAB System block. Inside the method, implement the following classes.
Use the Mask Editor user interface. For more information, see Customize MATLAB System Icon and 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
getIconImplmethod in your System object.
For more information, see Customize System Block Appearance Programmatically.