| Simulink Reference | ![]() |
Include an S-function in a model.
Library
Description
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-1 M-file or a Level-1 or Level-2 C MEX-file S-function (see Overview of S-Functions in Writing S-Functions for information on how to create S-functions).
| Note Use the M-File S-Function block to include a Level-2 M-file S-function in a block diagram. |
The S-Function block allows additional parameters to be passed directly to the named S-function. The function parameters can be specified as MATLAB expressions or as variables separated by commas. For example,
Note that although individual parameters can be enclosed in brackets, the list of parameters must not be enclosed in brackets.
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 Type Support
Depends on the implementation of the S-Function block.
Parameters and Dialog Box
Characteristics
| Selector | S-Function Builder | ![]() |
© 1994-2005 The MathWorks, Inc.