s-function in simulink MATLAB

rina picture rina · Jan 21, 2012 · Viewed 10.1k times · Source

I'm getting message

Error in S-function 'project1_simu/S-Function': S-Function 'chiu_sfcn' does not exist

whenever i run my simulink file which contains s-function block diagram. Any tips to resolving this problem?

Answer

RichColours picture RichColours · Apr 11, 2012

You need to compile the s function using mex.

Then the mex32 output file needs to be on the matlab path.