How to run exe file with inputs
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have earthquake data with the extension suds and I downloaded the sud2asc.exe file to convert the suds file to ascii file. The sud2asc.exe file is executed from the command window and requires the simple command for the conversion:
> sud2asc 20100901.suds 20100901.txt
The program does not read the wild card * or ?, so I have to convert all the event files individually. Since there are thousands of files, doing it individually will take an enormous time. Is there any way I can read the sud2asc.exe file in matlab and let it execute for all the events by itself?
Thanks
0 Commenti
Risposte (2)
Aurelien Queffurust
il 23 Set 2011
To answer at the title of your question : How do I pass arguments into and out of my standalone executable?
If you have the source code of sud2asc , make changes accordingly. Otherwise you will have to call the standalone within a for-loop.
0 Commenti
Jan
il 23 Set 2011
Yes.
cd('YourDataFolder'); % Set accordingly
List = dir('*.suds');
for iFile = 1:numel(List)
sudsName = List(iFile).name;
[dum, FileName] = fileparts(sudsName);
txtName = [FileName, '.txt'];
system(['sud2asc ', sudsName, ' ', txtName]);
end
0 Commenti
Vedere anche
Categorie
Scopri di più su String Parsing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!