Fixed-Point S-Functions: Fixed-Point Source
This example shows a custom C language S-function written to generate a constant value. This operation is available in Simulink® with the "Constant" block, which can be used for comparison with this S-function example.
To see the source code for the S-function, use the right-click context menu to select "Look Under Mask". When the dialog box appears, press the Edit button.