集成外部代码
使用自定义定点 S-Function 集成外部代码。
函数
主题
- Data Type Support
Lists the data types supported by the API and discusses the treatment of integers and data-type-overridden signals.
- S-Function 的结构
显示直接处理定点数据类型的 S-Function 的基本结构。
- Storage Containers
Discusses the containers used to hold signals in simulation and code generation.
- Data Type IDs
Describes the creation, assignment, and usage of data type IDs, including how to get and set information about data types in an S-function.
- Overflow Handling and Rounding Methods
Discusses the tokens you can use to define overflow handling and rounding methods in your fixed-point S-function, and describes the overflow logging structure.
- 创建 MEX 文件
描述为定点 S-Function 创建 MEX 文件所需的额外步骤。
- Get the Input Port Data Type
Within your S-function, you might need to know the data types of different ports, run-time parameters, and DWorks.
- Set the Output Port Data Type
You may want to set the data type of various ports, run-time parameters, or DWorks in your S-function.
- Interpret an Input Value
Suppose you need to get the value of the signal on your input port to use in your S-function.
- Write an Output Value
Suppose you need to write the value of the output signal to the output port in your S-function.
- Determine Output Type Using the Input Type
Using the data type of the input to your S-function to calculate the output data type.