How can I loop through different input text files when running a .exe in Matlab?
Show older comments
Hello,
I am running a .exe file in Matlab and looping through different input arguments. This is what the code looks like:
for a = [36, 37, 38]
system(sprintf('spei.exe %d fallon_input.txt %d.txt', a, a));
end
The first argument is a time scale in months. The second argument is the input file. The input file is fallon_input.txt. And the third argument is the output file. My question is how can I loop through different input files for each set of 'a' values?
Accepted Answer
More Answers (0)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!