Main Content

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.

  1. To define the icon, implement the getIconImpl method.

  2. To define the port labels, implement getInputNamesImpl to change the input and getOutputNamesImpl 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

To change the MATLAB System block dialog, implement getPropertyGroupsImpl and inside the method implement the following classes:

Descriptionmatlab.system.display Methods

Define header text for property group.


Group properties together.


Group properties into a separate tab.


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:

  1. Double-click your MATLAB System block.

  2. In the block dialog box, click the Source code. The MATLAB Editor that contains the System object code opens.

  3. In the MATLAB Editor, from the System Block drop-down list, select Add Image Icon.

  4. In the Add image icon dialog window, click Browse to select an image of your choice.

  5. Click OK to insert the corresponding code for the getIconImpl method in your System object.

For more information, see Customize System Block Appearance.

See Also


Related Topics