MATLAB: Is there an error message saying S-Function does not exist while it actually exists in Simulink 7.2 (R2008b)

simulink

I have created a MEX file on 32 bit MATLAB, Windows XP machine. When I try to run the MEX file on 64 bit MATLAB on Windows 7 machine, it gives the following error message:
Error in S-function 'control_codegen/control/ControlLaws/AppSW_Control_Laws/Minor Cycle Scheduler/Main Scheduler': S-Function 'scheduler' does not exist.

Best Answer

MEX file created on 32 bit MATLAB (mexw32) cannot be recognized by 64 bit MATLAB. Therefore, one needs to regenerate the MEX file on 64 bit MATLAB and the error message will disappear.