MATLAB Compiler    

Specifying S-Function Characteristics

Sample Time

Similar to the MATLAB Fcn block, the automatically generated S-function has an inherited sample time.

Data Type

The input and output vectors for the Simulink S-function must be double-precision vectors or scalars. You must ensure that the variables you use in the M-code for input and output are also double-precision values.


  Simulink Specific Options Converting Script M-Files to Function M-Files