S-Functions
An S-function is a computer language description of a Simulink®block written in MATLAB®, C, C++, or Fortran. You can develop an S-function to represent external code using an API that interacts with the Simulink engine . Use this S-function with the code generator to produce code . Start withS-Functions and Code Generation.
Blocks
Generated S-Function | Represent model or subsystem as generated S-function code |
Topics
About S-Functions
S-Functions and Code Generation
Use S-functions to extend Simulink support for simulation and code generation
Apply techniques for inlining S-Functions.
Build Integrated Code Within the Simulink Environment
Add support files and control model code generation and builds within the Simulink Environment.
Write S-Function and TLC Files By Hand
Write custom S-function and TLC files with more control of options.
Accelerate Simulation, Reuse Code, or Protect Intellectual Property by Using S-Function Target
Generate a shared library from a model or subsystem that you can load dynamically into another application.
Legacy Code Tool
Import Calls to External Code into Generated Code with Legacy Code Tool
Import calls to external code for utility functions, lookup tables, filters, and device drivers into the Simulink environment for simulation and code generation.
S-Function Builder Block
Generate S-Function from Subsystem
ApplyGenerate S-Functionoperation to create an S-Function from a subsystem block.
构建功能s Automatically(Simulink)
How to use the S-Function Builder to generate S-functions automatically from specifications that you supply.