Writing S-Functions

Chapter 1
Overview of S-Functions


S-functions (system-functions) provide a powerful mechanism for extending the capabilities of Simulink®. The following sections explain what an S-function is and when and why you might use one and how to write your own S-functions.

What Is an S-Function?
Brief overview of S-functions.
Using S-Functions in Models
How to insert S-functions as blocks in a model and pass parameters to them.
How S-Functions Work
How Simulink invokes S-functions when simulating a model that includes them.
Implementing S-Functions
How to write S-functions.
S-Function Concepts
Some key concepts needed to write certain types of S-functions.
S-Function Examples
Examples that illustrate the creation of various types of S-functions and S-function features.


 What Is an S-Function?