I am using a trans.exe
file, which when run asks for a parameter (=input) file. If I run trans.exe
using Matlab, then how can I directly give the parameter file inside the program without being prompted by Matlab to type it manually each time trans.exe
is run?
views:
55answers:
2
+1
A:
If your executable doesn't have the ability to accept command-line parameters, then your only option is to invoke a call which pipes stuff to the stdin of your executable (under Linux, this would be something like !echo "blah blah blah" | my_executable
). I don't know if this technique works from Matlab, though.
Oli Charlesworth
2010-10-09 00:18:28
A:
system('"C:\path_name\trans.exe" < "C:\path_name\input_trans_parameter_file.txt"');
The following command line used in above system
function directly uses the name of the input file stored in input_trans_parameter_file.txt
.
< "C:\path_name\input_trans_parameter_file.txt"
Harpreet
2010-10-10 19:12:28