Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

'name.bat' is not recognized as an internal or external command, operable program or batch file in matlab

Asked by shankar on 1 Jun 2012
Latest activity Commented on by kamilu sanusi about 2 hours ago

hi when i am trying to run a stateflow model of name"test.mdl" i am getting an error

Making simulation target "test_sfun", ...

'test_sfun.bat' is not recognized as an internal or external command, operable program or batch file. i am using wndows 7 64 bit os and matlab R2012a

i installed windows sdk 7.1 also. please help me for this

0 Comments

shankar

Tags

Products

4 Answers

Answer by Kaustubha Govind on 1 Jun 2012
Accepted answer

Have you run "mex -setup" on your R2012a installation? I have run into a similar issue in the past, and running "mex -setup" fixed it for me.

3 Comments

naveen on 22 Jul 2013

Hello,

Mex-Setup! where can I find this installation file. Please help me...

Kaustubha Govind on 23 Jul 2013

It's a MATLAB command. Just run "mex -setup" (without the quotes) at the MATLAB prompt.

ROHIT RAMTEKE on 25 Aug 2013

Thank you very much.....its really rocking in my model.

Kaustubha Govind
Answer by Sven on 28 Jun 2012

Great thats the solution. Thanks

0 Comments

Sven
Answer by Reem on 5 Nov 2013

Hello, I have the same problem and I dont have a mex_setup file since I am using 2013 version.. so what can I do ?

1 Comment

Enrique on 5 Feb 2014

I had the same error when i wanted to run my simulation, and it solved it. The only thing that you have to do is to write mex -setup in the command window.

Remember write "mex -setup" not "mex_setup" use a dash not an underscore

Reem
Answer by sin on 24 Feb 2014

i am using matlab 2013a and i have installed windows sdk 7.1 also. If i type mex-setup in the command window, it shows this :

Select a compiler: [1] Microsoft Software Development Kit (SDK) 7.1 in C:\Program Files (x86)\Microsoft Visual Studio 10.0

[0] None

Compiler: 1

*************************************************************************** Error: The Microsoft Windows Software Development Kit (SDK) installation is incomplete. Please be sure that the .NET Framework is installed correctly before attempting to reinstall the SDK. ***************************************************************************

Undefined function or variable 'setup'.

1 Comment

kamilu sanusi about 2 hours ago
This comment was flagged by kamilu sanusi

thank you Kaustubha Govind, i have been trying to solve this problem for very long time. the mex-setup really work

sin

Contact us