Customize System Objects for Simulink
TheMATLAB Systemblock enables a System object defined in MATLAB®to be used as a block in Simulink®. To control the block appearance or output, or to enable System object usage in a For Each subsystem, use the provided implementation methods to customize your System object. For more information about defining a System object, seeDefine Basic System Objects(MATLAB) orSystem Objects(MATLAB).
Methods
Classes
Topics
Overview
Define System Object for Use in Simulink
DevelopMATLAB Systemblock and interactively preview block dialog box.
System Design in Simulink Using System Objects
Steps for designing systems in Simulink using System objects
Block Appearance
Customize System Block Appearance
Customize theMATLAB Systemblock icon and the input and output names.
Customize System Block Dialog Box
Customize theMATLAB Systemblock dialog box by adding tabs, groups, description, and more.
Input and Output
Set Model Reference Discrete Sample Time Inheritance
Disallow model reference discrete sample time inheritance for a System object.
Use Enumerations in System Objects
Define enumerated data for use in System objects
Define global variables for use in System objects
If Simulink cannot infer the System object output characteristics, add methods to specify the size, data type, complexity, or discrete state output.
Special Use Cases
Use Update and Output for Nondirect Feedthrough
Implement nondirect feedthrough for a System object using theupdateImpl
,outputImpl
, andisInputDirectFeedthroughImpl
methods.
Enable For Each Subsystem Support
EnableFor Eachsubsystem support by using a System object in a SimulinkFor Eachsubsystem.
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.
Related Information
System Objects(MATLAB)