Package: matlab
Base class for System objects
matlab.System
is the base class for System objects. In your class definition file,
you must subclass your object from this base class (or from another class that derives from this base class). Subclassing
allows you to use the implementation and service methods provided by this base class to build your object. Type this
syntax as the first line of your class definition file to directly inherit from the matlab.System
base class, where ObjectName
is the name of your
object:
classdef ObjectName < matlab.System
You must set Access = protected
for each matlab.System
method
you use in your code.
allowModelReferenceDiscreteSampleTimeInheritanceImpl | Model reference sample time inheritance status for discrete sample times |
getDiscreteStateImpl | Discrete state property values |
getGlobalNamesImpl | Global variable names for MATLAB System block |
getHeaderImpl | Header for System object display |
getInputNamesImpl | Names of MATLAB System block input ports |
getNumInputsImpl | Number of inputs to the System object |
getNumOutputsImpl | Number of outputs from System object |
getOutputNamesImpl | Names of MATLAB System block output ports |
getPropertyGroupsImpl | Property groups for System object display |
getSimulateUsingImpl | Specify value for Simulate using parameter |
infoImpl | Information about System object |
isDiscreteStateSpecificationMutableImpl | Control whether discrete states can change data type |
isInactivePropertyImpl | Status of inactive property |
isInputComplexityMutableImpl | Set whether System object input complexity can change |
isInputDataTypeMutableImpl | Set whether System object input data type can change |
isInputSizeLockedImpl | Status of locked input size |
isInputSizeMutableImpl | Set whether System object input size can change |
isTunablePropertyDataTypeMutableImpl | Set whether tunable properties can change data type |
loadObjectImpl | Load System object from MAT file |
processInputSpecificationChangeImpl | Perform actions when input size, complexity, or data type change |
processTunedPropertiesImpl | Action when tunable properties change |
releaseImpl | Release resources |
resetImpl | Reset System object states |
saveObjectImpl | Save System object in MAT file |
setProperties | Set property values using name-value pairs when creating System object |
setupImpl | Initialize System object |
showFiSettingsImpl | Fixed point data type tab visibility for System objects |
showSimulateUsingImpl | Visibility of Simulate using parameter |
stepImpl | System output and state update equations |
supportsMultipleInstanceImpl | Support System object in Simulink For Each subsystem |
validateInputsImpl | Validate inputs to System object |
validatePropertiesImpl | Validate property values of System object |
You can apply attributes to the System object™ class and properties. To learn more about attributes, see Class Attributes or Property Attributes.
This table shows attributes that you can apply to the MATLAB® System object class.
Attribute Name | Description |
StrictDefaults | Control the defaults for the methods that restrict specification modifications changes:
By default, these methods return For System objects used in Simulink®, this attribute only restricts input size changes because Simulink already restricts complexity and data type for tunable properties, inputs, and states. |
Specify the class attribute value in parentheses followed by the class name, for example:
classdef (StrictDefaults) MySystemObject < matlab.System
You can apply the following attributes to any property of a custom System object.
Nontunable | Use Nontunable to prevent a user from changing that property value while the object
is in use. By default, all properties are tunable. The Nontunable attribute is useful
to lock down a property that has side effects when changed. This attribute is also useful for locking a
property value assumed to be constant during processing. You should always specify properties that affect
the number of input or output ports as Nontunable . |
Logical | Use Logical to limit the property value to a logical, scalar value. Any scalar
value that can be converted to a logical is also valid, such as 0 or 1. |
PositiveInteger | Use PositiveInteger to limit the property value to a positive integer value.
|
DiscreteState | Use DiscreteState to mark a property so it will display its state value when you
use the getDiscreteState method. |
matlab.system.StringSet
| matlab.system.display.Action
| matlab.system.display.Header
| matlab.system.display.Section
| matlab.system.display.SectionGroup
| matlab.system.mixin.CustomIcon
| matlab.system.mixin.FiniteSource
| matlab.system.mixin.Nondirect
| matlab.system.mixin.Propagates
| matlab.system.mixin.SampleTime