Call exe program with input in Matlab(under cmd Environment)

  • MATLAB
  • Thread starter alima2065
  • Start date
  • #1
2
0
Hi
I write M-file that call 'Program.exe' by SYESTEM command and go to the Program.exe Environment .now i need apply a command of 'Program.exe'. But i cannot control application with Matlab because Matlab go to 'Program.exe' Environment and 'Program.exe's command only is Executable and it is not automatically.

Thanks

Ali
 

Answers and Replies

  • #2
MATLABdude
Science Advisor
1,655
4
Welcome to PhysicsForums!

Are you asking how to add command-line parameters to DOS-style commands? If so, you can do that with the dos command:
http://www.mathworks.com/help/techdoc/ref/dos.html

If you're asking how to put input into the program once launched, that may be more difficult. It probably depends on how the program is structured (or, even easier, whether the program can take read in input from a textfile or some such).

A batch file can also be quite powerful:
http://www.google.ca/search?q=write+batch+file+windows
 
  • #3
2
0
Welcome to PhysicsForums!

Are you asking how to add command-line parameters to DOS-style commands? If so, you can do that with the dos command:
http://www.mathworks.com/help/techdoc/ref/dos.html

If you're asking how to put input into the program once launched, that may be more difficult. It probably depends on how the program is structured (or, even easier, whether the program can take read in input from a textfile or some such).

A batch file can also be quite powerful:
http://www.google.ca/search?q=write+batch+file+windows
MATLABdude thank you very much. my problem solved by batch file.
best regards
 

Related Threads on Call exe program with input in Matlab(under cmd Environment)

Replies
3
Views
6K
  • Last Post
Replies
4
Views
7K
  • Last Post
Replies
2
Views
8K
Replies
1
Views
4K
Replies
1
Views
3K
  • Last Post
Replies
2
Views
43K
Replies
1
Views
2K
Replies
9
Views
2K
  • Last Post
Replies
4
Views
2K
Top