Did you add the S-function and corresponding TLC to a directory under the $matlabroot/toolbox folder by any chance? If yes, you may need to run "rehash toolboxcache" for MATLAB to recognize new folders under this directory structure. (Although it is recommended that you place your files outside of the MATLAB installation root, because it could get wiped during upgrades or at un-install) Once you have done that, run "which model_DI" to make sure that MATLAB finds the MEX-file.
Regarding the error about parameters - could you include some code snippets about how you're registering your run-time parameters and how you use them in your mdlRTW function?
Best Answer