Was the S-Function generated on your machine, or elsewhere? The error about "The specified procedure could not be found." usually occurs when the MEX-function tries to load additional libraries that are not present on your system. Assuming that the S-function doesn't explicit load any DLLs, the most likely issue is that the S-function was compiled with some version of Microsoft Visual Studio and depends on the Visual Studio redistributables corresponding to that version. You need to find out which version of Visual Studio was used and install the right distributables.
Best Answer