matlab.system.display.Header class

Package: matlab.system.display

Header for System objects properties




matlab.system.display.Header(N1,V1,...Nn,Vn) defines a header for the System object™, with the header properties defined in Name-Value (N,V) pairs. You use matlab.system.display.Header within the getHeaderImpl method. The available header properties are

  • Title — Header title string. The default value is an empty string.

  • Text — Header description text string. The default value is an empty string.

  • ShowSourceLink — Show link to source code for the object.

matlab.system.display.Header(Obj,...) creates a header for the specified System object (Obj) and sets the following property values:

  • Title — Set to the Obj class name.

  • Text — Set to help summary for Obj.

  • ShowSourceLink — Set to true if Obj is MATLAB code. In this case, the Source Code link is displayed. If Obj is P-coded and the source code is not available, set this property to false.

You can use mfilename('class') from within this method to get the name of the System object. If you set any Name-Value pairs, those property values override the default settings.


getHeaderImplHeader for System object display


expand all

Define System Block Header

Define a header in your class definition file.

 methods (Static, Access = protected)
    function header = getHeaderImpl
       header = matlab.system.display.Header(mfilename('class'), ...
           'Text','An alternative class description');

The resulting output appears as follows. In this case, Source code appears because the ShowSourceLink property was set to true.

Was this topic helpful?