创建 C/C++ S-Function
使用 C 或 C++ 代码编写 S-Function
您可以通过从头开始编写 S-Function、使用 S-Function Builder 或使用代码继承工具来创建 C/C++ S-Function。上述每种方法都涉及在编写 S-Function 的容易性和 S-Function 支持的功能之间进行权衡。
模块
S-Function | 在模型中包含 S-Function |
S-Function Builder | 集成 C 或 C++ 代码以创建 S-Function |
主题
关于 C/C++ S-Function
- Create and Implement a Basic C MEX S-Function
Construct the code to create an S-function. - Simulink Engine Interaction with C S-Functions
Learn how the Simulink® engine interacts with a C S-function to create and debug your own C S-functions. - S-Function Callback Methods
Implement S-function callback methods. - S-Function SimStruct Functions
Access Simulink data structure through SimStruct macros and functions.
创建 C S-Function
- Templates for C S-Functions
Use code templates as starting points for writing your own C S-functions. - C MEX S-Function Examples
Model systems through C MEX S-function examples. - S-Function Examples
Create various types of S-functions and S-function features. - MATLAB Data in C S-Functions
PerformmxArray
manipulation in C S-functions. - Convert Level-1 C MEX S-Functions
Convert S-functions written for earlier Simulink releases to work with the current version.
创建 C++ S-Function
- Create C++ Source File
Create a C++ S-function from a C S-function. - Make C++ Objects Persistent
Create C++ objects that persist across invocations of the S-function. - Build C++ S-Functions
Build a C++ S-function.