Fixed-Point S-Functions: Arithmetic Shift

This example shows a custom C language S-function written to perform an arithmetic shift. This operation is available in Simulink® with the "Shift Arithmetic" 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.

Was this topic helpful?