Documentation Center

  • Trial Software
  • Product Updates

matlab.system.display.SectionGroup class

Package: matlab.system.display

Section group for System objects

Syntax

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

Description

matlab.system.display.SectionGroup(N1,V1,...Nn,Vn) creates a group for displaying System object™ properties and display sections created with matlab.system.display.Section. You define such sections or properties using property Name-Value pairs (N,V). A section group can contain both properties and sections. You use matlab.system.display.SectionGroup to define section groups using the getPropertyGroupsImpl method. Section groups display as separate tabs in the MATLAB System block. The available Section properties are

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

  • TitleSource — Source of group 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 — Group or tab description that appears above any properties or panels. The default value is an empty string.

  • PropertyList — Group or tab 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.

  • Sections — Group sections as an array of section objects. If the Obj name is given, the default value is the default section for the Obj.

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

  • TitleSource — Set to 'Auto'.

  • Sections — Set to matlab.system.display.Section object for 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 Block Dialog Tabs

Define in your class definition file two tabs, each containing specific properties. For this example, you use the matlab.system.display.SectionGroup, matlab.system.display.Section, and getPropertyGroupsImpl methods.

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'});
            
      mainGroup = matlab.system.display.SectionGroup(...
           'Title','Main', ...
           'Sections',[valueGroup,thresholdGroup]);
            
      initGroup = matlab.system.display.SectionGroup(...
           'Title','Initial conditions', ...
           'PropertyList',{'IC1','IC2','IC3'});
 
      groups = [mainGroup,initGroup];
   end
end

The resulting dialog appears as follows when you add the object to Simulink® with the MATLAB System block.

See Also

|

How To

Was this topic helpful?