自定义适用于 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.
模块外观
- Customize System Block Appearance
Customize the MATLAB System block icon and the input and output names. - Customize System Object Dialog Box Using Mask Editor
Customize the MATLAB System by using the Mask Editor graphical user interface.
输入和输出
- Set Model Reference Discrete Sample Time Inheritance
Disallow model reference discrete sample time inheritance for a System object. - Use Global Variables in System Objects
Define global variables for use in System objects. - Specify Output
If Simulink cannot infer the System object output characteristics, add methods to specify the size, data type, complexity, or discrete state output.
特殊用例
- 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. - Specify Sample Time for MATLAB System Block System Objects
This example shows how to control the sample time of the MATLAB System block using System object™ methods.