Include S-function in model
Simulink / User-Defined Functions
The S-Function block provides access to S-functions from a block diagram. The S-function named as the S-function name parameter can be a Level-2 MATLAB® or a Level-1 or Level-2 C MEX S-function (see MATLAB S-Function Basics for information on how to create S-functions).
Note
Use the Level-2 MATLAB S-Function block to include a Level-2 MATLAB S-function in a block diagram.
The S-Function block displays the name of the specified S-function and the number of input and output ports specified by the S-function. Signals connected to the inputs must have the dimensions specified by the S-function for the inputs.
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
[a] Actual data type or capability support depends on block implementation. [b] See Writing Fixed-Point S-Functions for details on using fixed-point data types in S-functions. |