MATLAB: “Unable to locate ‘mexopts.bat’, and therefore cannot determine which compiler to use for simulation builds. Use ‘mex -setup’ to select a supported compiler.” I am getting this error. Suggest me what to do.

pv arraysimulinksubsystems

I was trying to simulate my PV array model using simulink, i got an these error messages. Pls tell me the step by step procedure to solve this.

Best Answer

At the MATLAB command line, type exactly what the error message told you to type:
mex -setup
Then press Enter when it asks you if you want MATLAB to locate compilers. Then enter the number of the compiler you want to use from the list (hopefully there is at least one compiler listed).
If no compiler is listed, then you will have to install one.
Related Question