Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

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

  1. Aug 7, 2011 #1
    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
     
  2. jcsd
  3. Aug 9, 2011 #2

    MATLABdude

    User Avatar
    Science Advisor

    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
     
  4. Aug 9, 2011 #3
    MATLABdude thank you very much. my problem solved by batch file.
    best regards
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Call exe program with input in Matlab(under cmd Environment)
  1. Matlab programming (Replies: 0)

  2. Programming in Matlab (Replies: 4)

Loading...