自定义适用于 Simulink 的 System object
自定义 System object™ 以便在 MATLAB System 模块中使用
MATLAB System 模块支持在 Simulink® 中将在 MATLAB® 中定义的 System object 作为模块使用。要控制模块的外观或输出,或者要允许在 For Each 子系统中使用 System object,请使用所提供的实现方法对您的 System object 进行自定义。有关定义 System object 的详细信息,请参阅定义基本 System object 或 System object。
方法
类
主题
概述
- Define System Object for Use in Simulink
Develop MATLAB System block and interactively preview block dialog box. - System Design in Simulink Using System Objects
Design systems in Simulink using System objects. - Simulink Engine Interaction with System Object Methods
Follow a process view of the order in which the MATLAB System block invokes System object methods within the context of the Simulink engine. - Considerations for Using System Objects in Simulink
Consider these guidelines when working with variable-size signals, tunable parameters, and For Each subsystems.
模块外观
- Customize MATLAB System Icon and Dialog Box Using Mask Editor
Customize MATLAB System block appearance using Mask Editor graphical user interface.
输入和输出
- Set Model Reference Discrete Sample Time Inheritance
Disallow model reference discrete sample time inheritance for a System object. - 在系统对象中使用全局变量
定义在系统对象中使用的全局变量。 - Specify Output
If Simulink cannot infer the System object output characteristics, add methods to specify the size, data type, complexity, or discrete state output. - Add and Implement Propagation Methods
To define output specifications, use propagation methods.
特殊用例
- Use System Objects in Feedback Loops
Process nondirect feedthrough data through the System object. - Use Update and Output for Nondirect Feedthrough
Implement nondirect feedthrough for a System object using theupdateImpl
,outputImpl
, andisInputDirectFeedthroughImpl
methods. - Enable For Each Subsystem Support
Enable For Each subsystem support by using a System object in a Simulink For Each subsystem. - 指定 MATLAB 系统模块系统对象的采样时间
此示例显示如何使用 System object™ 方法控制 MATLAB 系统模块的采样时间。