Information and Options

Return information about the S-function, set simulation options

S-Function Callback Methods

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

SimStruct Functions

ssSetOptionsSpecify S-function options
ssCallExternalModeFcnInvoke the external mode function for an S-function
ssGetModelNameGet the model name
ssGetParentSSGet the parent of a SimStruct
ssGetPathGet the path of a block
ssGetRootSSGet the root of a SimStruct hierarchy
ssGetUserDataAccess user data
ssSetExternalModeFcnSpecify the external mode function for an S-function
ssSetPlacementGroupSpecify the name of the placement group of a block
ssSetUserDataSpecify user data
ssSupportsMultipleExecInstancesSpecify 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?