You can define your own System object by customizing the implementation methods. Use graphical tools to explore the comprehensive API for creating System objects. For example, you can insert methods to initialize, run, reset, and terminate System objects. For an introduction to defining a System object, see Define Basic System Objects.
matlab.System | Base class for System objects |
matlab.system.mixin.FiniteSource | Finite source mixin class |
Create a basic System object with the stepImpl
method.
Specify property attributes to limit the type, visibility, and value of properties.
This example shows how to set the number of inputs for a System object™ with and without using getNumInputsImpl
.
Define Composite System Objects
Define System objects that include other System objects as properties.
Handle Input Specification Changes
Implement methods to restrict when System object input complexity, data type, or size can change or implement a method to react when input specifications change.
Tips for Defining System Objects
Tips to speed up slow System objects.
Call sequence showing the order of methods when you run a System object.
This example shows how to define a System object that performs a specific number of steps or specific number of reads from a file.
Use a MATLAB structure to save and load System object properties and state.
Customize System Objects for Simulink (Simulink)
System Objects in MATLAB Code Generation (MATLAB Coder)