Quantcast

Documentation Center

  • Trial Software
  • Product Updates

getIconImpl

Class: matlab.system.mixin.CustomIcon
Package: matlab.system.mixin

Name to display as block icon

Syntax

icon = getIconImpl(obj)

Description

icon = getIconImpl(obj) returns the string or cell array of strings to display on the block icon of the System object implemented through the MATLAB System block. If you do not specify the getIconImpl method, the block displays the class name of the System object™ as the block icon. For example, if you specify pkg.MyObject in the MATLAB System block, the default icon is labeled My Object

getIconImpl is called by the getIcon method, which is used by the MATLAB System block during Simulink® model compilation.

    Note:   You must set Access=protected for this method.

Input Arguments

obj

System object handle

Output Arguments

icon

String or cell array of strings to display as the block icon. Each cell is displayed as a separate line.

Examples

expand all

Add System Block Icon Name

Specify in your class definition file the name of the block icon as 'Enhanced Counter' using two lines.

methods (Access=protected)
   function icon = getIconImpl(~)
      icon = {'Enhanced','Counter'};
   end
end

See Also

How To

Was this topic helpful?