Documentation Center

  • Trial Software
  • Product Updates

matlab.system.display.Section class

Package: matlab.system.display

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 string. The default value is an empty string.

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

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

  • 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 publically-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.

Methods

Examples

expand all

Define Property Groups

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.

See Also

|

How To

Was this topic helpful?