Motorola DSP Developer's Kit    

Simulink S-Function MEX-Files

Before continuing, we recommend you read "Getting Started" (Chapter 1), "Creating a Model" (Chapter 3) and the "Writing S-Functions as C MEX-Files" section of "S-Functions" (Chapter 8), in Using Simulink. For more detailed information, refer to Writing S-Functions.

Required Definitions

Define only the following macros in your MEX-file:

For example,

The MAX*/MIN* macros described for MATLAB MEX-files are specifically not required for Simulink S-functions.

Also, the template provides an example of optional dialog box parameter checking within the mdlCheckParameters function.


 Terminating and Allocated Memory Cleanup Input Objects