Main Content

S-Functions

Develop S-function to represent external code and inline S-function with Target Language Compiler (TLC) block target file

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 with S-Functions and Code Generation.

Blocks

Generated S-FunctionRepresent model or subsystem as generated S-function code

Topics

Write S-Functions

Legacy Code Tool

S-Function Builder Block