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

c-compiler

how can solve this issue with the compiler
I use a sine-wave source connected to embedded matlab function with same function input equal output then connected to the scope. easy model
when run this model i get error: Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks. Use 'mex -setup' to select a supported C-compiler.

Best Answer

You need to setup your compiler.
As the error suggests, go to to the MATLAB command line and type
mex -setup
For more information: Selecting a Compiler
Related Question