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, right-click a User Written Fixed Point Arithmetic Shift Right block. In the Edit Mask row of the context menu, pause on the arrow, and then click Look Inside Mask. When the dialog box appears, click the Edit button.

