In order to convert a C function to an S-Function in Modelify, you have to ensure that a C compiler is set up in the MATLAB installation Modelify is using.
Type "mex -setup c"
on a MATLAB Command Window to determine whether a C compiler is set up. You will get a message indicating whether a C compiler is set up. If a compiler is not set up, it will show a list of installed compilers so that you can pick one. If no supported compiler is installed on your system, then it will provide a link to a document that lists supported and compatible compilers for your MATLAB installation.
Below is a sample message shown when no supported compiler is found.
As indicated in the previous section, the "mex -setup c"
command will return a link to a document that lists the supported and compatible compilers for your MATLAB installation.
A list of supported compilers for all MATLAB versions can be found at http://www.mathworks.com/support/sysreq/previous_releases.html. The page includes details about compilers for each specific OS, and in some cases it provides a download link for the compiler as well as installation instructions.
Below is a sample message shown when a C compiler is set up.
For further information about setting a C compiler see the Change Default Compiler MATLAB help page.