To create a MEX-file for a user-written fixed-point C S-function on either Windows® or UNIX® systems:
In your S-function, include fixedpoint.c
and
fixedpoint.h
. For more information, see Structure of the S-Function.
Pass an extra argument, -lfixedpoint
, to the
mex
command. For example,
mex('sfun_user_fxp_asr.c','-lfixedpoint')