I have a model in matlab simulink. I have installed matlab in D drive. When I run my model I get the following error:

Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks.
Use 'mex -setup' to select a supported C-compiler.

This is not a syntax or semantics. How can I solve this? Thanks

1

There are 1 answers

9
am304 On

As suggested in the comments, you need to run mex -setup to set up a C compiler. For a list of supported C compilers for your MATLAB version (you don't say whether it is R2013a or R2013b, and which O/S you are running on), see Supported and Compatible Compilers – Release 2013a and Supported and Compatible Compilers – Release 2013b on the MathWorks web site.