passing multiple inputs to .exe via system or dos
Afficher commentaires plus anciens
I'm trying to pass a series of inputs to an executable via the system command, but in every way I've tried to run it, I'm prompted to manually input values in the command window. I need to run this program several hundred times, so I'd rather not enter parameters manually. The program is called solid.exe and is available here if you're feeling compelled to give it a shot.
To get solid earth tide estimates for March 12, 2005 at (65°N,123°E), I've tried
system('solid.exe 2005 3 12 65 123')
and
s = sprintf('solid.exe %s \r %s \r %s \r %s \r %s','2005', '3','12','65','123');
system(s);
and a whole host of other ways to concatenate strings. No matter what I try, the command window still wants manual data entry. I can simply type
system('solid.exe')
and when I enter parameters, it takes a fraction of a second for the program to run. How can I automate this to compute a series of lat, lon and times?
1 commentaire
per isakson
le 31 Mar 2015
"host of other ways"   Did you try /r instead of \r? Option in "DOS" are typically preceded by /
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Simulink dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!