Information and Options

Return information about the S-function, set simulation options

S-Function Callback Methods

mdlInitializeSizes Specify the number of inputs, outputs, states, parameters, and other characteristics of the C MEX S-function

SimStruct Functions

ssSetOptions Specify S-function options
ssCallExternalModeFcn Invoke the external mode function for an S-function
ssGetModelName Get the model name
ssGetParentSS Get the parent of a SimStruct
ssGetPath Get the path of a block
ssGetRootSS Get the root of a SimStruct hierarchy
ssGetUserData Access user data
ssSetExternalModeFcn Specify the external mode function for an S-function
ssSetPlacementGroup Specify the name of the placement group of a block
ssSetUserData Specify user data
ssSupportsMultipleExecInstances Specify that a For Each Subsystem block supports an S-function operating inside the subsystem.

Examples and How To

Matrices in C S-Functions

How to perform MX array manipulation in C S-functions.

Sim Viewing Devices in External Mode

How to create a sim viewing device for use in external mode.


S-Function Callback Methods

Description of S-function callback methods

S-Function SimStruct Functions

Overview of SimStruct macros and functions.

Was this topic helpful?