MATLAB: Emlc error in converting M-code to C-code

embedded matlab

Hi,
I am going to convert an M-code to C-code.
I started with the Simulink Real-Time Workshop demo i.e.:
Demos>Simulink > Real-Time Workshop > Application Samples > Embeddable C-Code Generation Using Embedded MATLAB Coder
For compiling the M-File into an executable file I tried exactly what the demo says, i.e.:
emlc -T rtw:exe -o rtwdemo_emlcsobel rtwdemo_emlcmain.m stdio.h
It should be mentioned that the file main.c was generated, however I got this error:
??? Unknown compiler
Error in ==> main Line: 1 Column: 1
Compilation failed: Open error report.
??? Error using ==> emlc
It seems that the compiled algorithm is not generated. I have the license for real-time_workshop.
Any idea?
Many thanks
Arza

Best Answer

You need to get one of the supported compilers and then run mex -setup: http://www.mathworks.com/support/compilers/release2008a/
Related Question