Attribute Lists

Attribute Types

The attributes appear in an AttributeList, which is a comma separated list of pairs, as defined in the MATLAB® class system grammar. Simscape™ language distinguishes between two types of attributes: model attributes and member attributes.

Model Attributes

Model attributes are applicable only to model type component.

AttributeValuesDefaultModel ClassesDescription
Propagationpropagates
source
blocks
propagatescomponentDefines the domain data propagation of the component. See Propagation of Domain Parameters.
Hiddentrue
false
falsecomponentDefines the visibility of the entire component. This dictates whether the component shows up in a generated library or report.

Component model attributes apply to the entire model. For example:

component ( Propagation = source ) MyParameterSource
  % component model goes here
end

Here, Propagation is a model attribute.

Member Attributes

Member attributes apply to a whole declaration block.

AttributeValuesDefaultMember ClassesDescription
Accesspublic
private
protected
publicallDefines the read and write access of members. Private members are only accessible to the instance of the component model and not to external clients.
Hiddentrue
false
falseallSets the visibility of the member in the user interface.
Balancingtrue
false
falsevariablesIf set to true, declares Through variables for a domain. You can set this attribute to true only for model type domain. See Declaring Through and Across Variables for a Domain.
Conversionabsolute
relative
absoluteparameters
variables
Defines how the parameter or variable units are converted for use in the setup and equation sections. See Specifying Parameter Units.

The attribute list for the declaration block appears after MemberClass keyword. For example:

parameters ( Access = public, Hidden = true )
  % parameters go here
end

Here, all parameters in the declaration block are externally writable, but they will not appear in the block dialog box.

Was this topic helpful?