创建系统对象
写一个matlab®class that creates and defines a new System object™
您可以通过自定义实现方法来定义自己的系统对象。使用图形工具探索用于创建系统对象的综合API。例如,您可以插入方法以初始化,运行,重置和终止系统对象。有关定义系统对象的介绍,请参见Define Basic System Objects.
方法
Classes
matlab.System |
Base class for System objects |
matlab.system.mixin.FiniteSource |
Finite source mixin class |
Topics
入门编写系统对象
Property Attributes
- Define Property Attributes
Specify property attributes to limit the type, visibility, and value of properties.
输入和输出
- Change the Number of Inputs
This example shows how to set the number of inputs for a System object™ with and without usinggetNumInputsimpl
. - 定义复合系统对象
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.
Performance and Efficiency
- Tips for Defining System Objects
Tips to speed up slow System objects. - Detailed Call Sequence
在运行系统对象时,呼叫序列显示方法的顺序。 - Define Finite Source Objects
This example shows how to define a System object that performs a specific number of steps or specific number of reads from a file. - 节省and Load System Object
Use a MATLAB structure to save and load System object properties and state.
Related Information
- Customize System Objects for Simulink(Simulink)
- MATLAB代码生成中的系统对象(MATLAB Coder)