MATLAB: Do I get an MATLAB Function Interface error message when running a model with a MATLAB block in Simulink 7.7 (R2011a)

simulink

When I run a model with a MATLAB block, I get the following error message:
MATLAB Function Interface Error: Error calling generated SFunction, untitled_sfun. Undefined function or method 'untitled_sfun' for input arguments of type 'double'.

Best Answer

This error message can occur if the model is stored in a directory that starts with the '+' or '@' character. Directories with those names are reserved for use with MATLAB packages and classes.
To work around this error message, move the .mdl model file to a directory that does not start with the '+' or '@' character.