Hello I'm new to Octave and was wondering if it is possible to do batch processing,
wonderful would be something like
system(command -opt1 -in -out1)
system(command -opt2 -in -out2)
I first started using Octave doing exactly this. Sort of a brute force parameter sweep tool for an external program. works very well for programs that take text input/output files. I used it for Elmer (finite element analysis) for that reason. General process was to create dummy input files, use octave and for loops to script parameter sweeps, and file/string i/o commands to build complete input files. then call the program with the system command as you said, naming output files according to the looped parameter.
doesn't work for me!
not sure exactly. you just pass a string to system() and it should execute. the string should be part of the for loop, with part of the options depending on the loop variable. is your problem building the string or that the system command doesn't seem to run right with the string? have you built up some simple test cases? call a couple simple system commands to create a text file with your variable string or something similar.
ALso, what OS are you running on? It shouldn't matter, but there are a few options for the system command regarding sync or async behavior, how to send the output, etc, that can change behavior. maybe it matters for your case. Here's a really simple example if you're using Windows.
for idx = 1:3
system(['dir >> test',num2str(idx),'.txt']);
this should create three text files names test1.txt, test2,txt, and test3.txt, each containing the file contents of you current working directory.