主要内容

创建系统对象

写一个matlab®class that creates and defines a new System object™

您可以通过自定义实现方法来定义自己的系统对象。使用图形工具探索用于创建系统对象的综合API。例如,您可以插入方法以初始化,运行,重置和终止系统对象。有关定义系统对象的介绍,请参见Define Basic System Objects.

方法

expand all

setupImpl InitializeSystem object
stepImpl 系统输出和状态更新方程
resetImpl 重启System objectstates
releaseImpl Release resources
infoImpl Information aboutSystem object
isdoneimpl End-of-data flag
Isinactive propertyimpl Status of inactive property
isTunablePropertyDataTypeMutableImpl 设置可调属性是否可以更改数据类型
isDiscreteStateSpecificationMutableImpl Control whether discrete states can change data type
processTunedPropertiesImpl Action when tunable properties change
setProperties Set property values using name-value pairs when creatingSystem object
validatePropertiesImpl 验证属性值System object
getPropertyGroupsImpl Property groups for System object display
getNumInputsimpl Number of inputs to the System object
getNumOutputsimpl Number of outputs fromSystem object
getNumInputs Number of inputs required to call theSystem object
getNumOutputs Number of outputs from calling theSystem object
isInputComplexityMutableImpl Set whether System object input complexity can change
ISInputDatatyPemutableImpl 设置系统对象输入数据类型是否可以更改
isInputSizeMutableImpl 设置系统对象输入大小是否可以更改
nargin Number of input arguments forSystem object
Nargout Number of output arguments forSystem object
ProcessInputSpecificationChangeImpl Perform actions when input size, complexity, or data type change
validateInputsImpl Validate inputs toSystem object
loadObjectImpl LoadSystem objectfrom MAT file
SaveObjectImpl 节省System objectin MAT file
sysobjupdate Update customSystem objectto latest syntax

Classes

matlab.System Base class for System objects
matlab.system.mixin.FiniteSource Finite source mixin class

Topics

输入和输出

  • 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