主要内容

使用旧代码工具实现算法

集成现有的C或C ++功能,例如设备驱动程序或外部仿真代码

You can integrate existing C (or C++) functions, such as device drivers, lookup tables, and general functions and interfaces, into Simulink®模型通过使用遗留代码的工具。使用北方联盟党cy Code Tool to specify the name of the S-function, files, and path required for the compilation, and options for the generated S-function.

使用LEGACY_CODE函数以生成s功能,编译并链接生成的S功能,并创建用于调用生成的S功能的掩码。

在您可以使用之前LEGACY_CODE,确保为您的MATLAB设置C编译器®安装。

功能

LEGACY_CODE 使用旧代码工具

Topics

Integrate C Functions Using Legacy Code Tool

使用旧版代码工具从现有的C代码自动生成S函数。

s函数包含旧版C代码

使用手写C MEX函数,S功能构建器和旧版代码工具合并旧版C代码。

使用MATLAB功能块集成C代码

利用MATLAB功能调用外部C代码并控制枚举和总线Typedefs的块。

特色示例