matlab.system.display.Section class

Package: matlab.system.display
Superclasses:

Property group section for System objects

Syntax

matlab.system.display.Section(N1,V1,...Nn,Vn)
matlab.system.display.Section(Obj,...)

Description

matlab.system.display.Section(N1,V1,...Nn,Vn) creates a property group section for displaying System object™ properties, which you define using property Name-Value pairs (N,V). You use matlab.system.display.Section to define property groups using the getPropertyGroupsImpl method. The available Section properties are

  • Title — Section title. The default value is an empty character vector.

  • TitleSource — Source of section title. Valid values are 'Property' and 'Auto'. The default value is 'Property', which uses the character vector from the Title property. If the Obj name is given, the default value is Auto, which uses the Obj name.

  • Description — Section description. The default value is an empty character vector.

  • PropertyList — Section property list as a cell array of property names. The default value is an empty array. If the Obj name is given, the default value is all eligible display properties.

    Note

    Certain properties are not eligible for display either in a dialog box or in the System object summary on the command-line. Property types that cannot be displayed are: hidden, abstract, private or protected access, discrete state, and continuous state. Dependent properties do not display in a dialog box, but do display in the command-line summary.

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

  • TitleSource — Set to 'Auto', which uses the Obj name.

  • PropertyList — Set to all publicly-available properties in the Obj.

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.

Examples

collapse all

Define two property groups in your class definition file by specifying their titles and property lists.

 methods (Static, Access = protected)
    function groups = getPropertyGroupsImpl
       valueGroup = matlab.system.display.Section(...
            'Title','Value parameters',...
            'PropertyList',{'StartValue','EndValue'});
 
       thresholdGroup = matlab.system.display.Section(...
            'Title','Threshold parameters',...
            'PropertyList',{'Threshold','UseThreshold'});
       groups = [valueGroup,thresholdGroup];
    end
 end

When you specify the System object in the MATLAB System block, the resulting dialog box appears as follows.