Main Content

Structure of the S-Function

The following diagram shows the basic structure of an S-function that directly handles fixed-point data types.

The callouts in the diagram alert you to the fact that you must include fixedpoint.h and fixedpoint.c at the appropriate places in the S-function. The other elements of the S-function displayed in the diagram follow the standard requirements for S-functions.

To learn how to create a MEX-file for your user-written fixed-point S-function, see Create MEX-Files.