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
    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.


  2. jcsd
  3. Aug 9, 2011 #2


    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:

    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:
  4. Aug 9, 2011 #3
    MATLABdude thank you very much. my problem solved by batch file.
    best regards
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook