Fortran S-Functions

Create custom blocks defined by Fortran code


S-Function Include S-function in model

Examples and How To

Create Level-1 Fortran S-Functions

Describes a purely Fortran approach to creating an S-function.

Create Level-2 Fortran S-Functions

Describes a hybrid C/Fortran approach to writing an S-function that enables creation of more capable blocks.

Port Legacy Code

How to wrap a C MEX S-function around existing Fortran code.


Level-1 Versus Level-2 S-Functions

Overview of approaches to writing Fortran S-functions.

Was this topic helpful?