S-Function Basics

Apply S-Function implementation, features, and limitations.


S-Function Include S-function in model
S-Function Builder Create S-function from C code that you provide

Examples and How To

Use S-Functions in Models

How to insert S-functions as blocks in a model and pass parameters to them.

S-Function Examples

Examples that illustrate the creation of various types of S-functions and S-function features.

Implement S-Functions

Provides high-level descriptions of how to implement different types of S-functions.

C MEX S-Function Examples

Examples of C MEX S-functions.


What Is an S-Function?

Brief overview of S-functions.

How S-Functions Work

How the Simulink® engine invokes S-functions when simulating a model that includes them.

Implementing S-Functions

How to write S-functions.

S-Function Callback Methods

Description of S-function callback methods

S-Function Compatibility

User-written level-2 S-functions are backward compatible in terms of their source code (C/C++).

S-Function SimStruct Functions

Overview of SimStruct macros and functions.

S-Function Concepts

Key concepts needed to write certain types of S-functions.

Available S-Function Implementations

Describes the different methods for implementing an S-function.

S-Function Types

Guidelines for choosing an S-function implementation for a particular application.

S-Function Features

Compares features supported by different types of S-function implementations.

S-Function Limitations

Compares limitations of different type of S-function implementations.

Was this topic helpful?