Writing S-Functions | ![]() ![]() |
Compiling C S-Functions
S-functions can be compiled in one of three modes identified by the presence of one of the following defines:
MATLAB_MEX_FILE
-- Indicates that the S-function is being built as a MEX-file for use with Simulink.RT
-- Indicates that the S-function is being built with the Real-Time Workshop generated code for a real-time application using a fixed-step solver.NRT
-- Indicates that the S-function is being built with the Real-Time Workshop generated code for a nonreal-time application using a variable-step solver.![]() | The SimStruct | How Simulink Interacts with C S-Functions | ![]() |