ERROR IN MATLAB CODER...

I´m using the MATLAB example Hello World for testing the MATLAB coder tool. (The simplest example in the MATLAB HELP), and the MATLAB give-me follow error report in the prompt window.
??? Attempted to access instrumentAndRunPos(0); index must be a positive integer or logical.
Error in ==> echodemo>formatError at 245 stackStart = max(iRet(iRet < instrumentAndRunPos(end)));
Error in ==> echodemo at 183 disp(formatError(mExc))
somebody could help me? Thanks in advance.

 채택된 답변

Joao Paulo
Joao Paulo 2012년 5월 10일

0 개 추천

Problem solved: go to System-> Enviroment Variable-> System Variable and verify if there is in the Varible Path the following directories
%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\Wbem;%MATLAB ROOT%\runtime\win32;%MATLAB ROOT%\bin
The problem was solved after setting that.
Thanks a lot Kaustubha Govind Titus Edelhofer!

댓글 수: 1

Titus Edelhofer
Titus Edelhofer 2012년 5월 11일
That's good to hear. You might mark the question as answered then ...
Titus

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Titus Edelhofer
Titus Edelhofer 2012년 5월 10일

2 개 추천

Hi,
it looks as if the demo fails (and echodemo does not produce a "nice" error message). I would suggest to run the demo just as a script, i.e.,
edit coderdemo_hello_world
and then press the "run" button (or just press F5). Probably the demo will fail but should give a more helpful error message ...
Titus

댓글 수: 5

Joao Paulo
Joao Paulo 2012년 5월 10일
Thank you for the help. I did the suggested,so I had the more detailed error report, but the problem persist, the error is :
link /dll /LIBPATH:"C:\PROGRA~1\MATLAB\R2011a\extern\lib\win32\microsoft" libmx.lib libmex.lib libmat.lib /MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /manifest /incremental:NO /implib:"hello_world_mex.x" /MAP:"C:\Users\Joao\Desktop\Teste_geracao\coderdemo_hello_world\codegen\mex\hello_world\hello_world_mex.mexw32.map" /NODEFAULTLIB:LIBCMT /OUT:hello_world_mex.mexw32 hello_world.obj hello_world_initialize.obj hello_world_terminate.obj hello_world_api.obj hello_world_mex.obj @hello_world_mex_mex.arf
12 Creating library hello_world_mex.x and object hello_world_mex.exp
13 'cmd' nÆo ‚ reconhecido como um comando interno
14 ou externo, um programa oper vel ou um arquivo em lotes.
15 gmake: *** [hello_world_mex.mexw32] Error 1
Kaustubha Govind
Kaustubha Govind 2012년 5월 10일
What happens when you type "!cmd &" (without the quotes) from the MATLAB prompt?
Kaustubha Govind
Kaustubha Govind 2012년 5월 10일
Also, could you look at my comment on this page: http://www.mathworks.com/matlabcentral/answers/2926-convert-matlab-to-c-using-emlc-function
Joao Paulo
Joao Paulo 2012년 5월 10일
the DOS prompt opened and gave-me the message: "cmd is not recognized as a intern comand, batch command or a batch file"
Joao Paulo
Joao Paulo 2012년 5월 10일
I´m using Visual Studio, Do I have to install additionally gcc compiler to acess the gmake comand? I looked the topic which you have cited, and I searched for the system variable. There is a System Variable ComSpec which point to the path C:Windows\system32\cmd.exe .

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by