| Writing S-Functions | ![]() |
S-Function Examples
Most S-Function blocks require the handling of states, continuous or discrete. The following sections discuss common types of systems that you can model in Simulink with S-functions:
All examples are based on the C MEX-file S-function template sfuntmpl_basic.c and on sfuntmpl_doc.c, which contains a discussion of the S-function template.
| Checking Array Bounds | Example of a Continuous State S-Function | ![]() |