C.Colden
C.Colden

Reputation: 627

Running same script with different input variables using batch command

I would like to run a script called 'myscript' using the batch command:

j = batch('myscript')

My script has a function in the beginning so:

function myscript(input)
...
end

Is it somehow possible to run batch files with different input parameters for my function? I know that there are matlabpool, parfor etc commands, but it is unfortunately not working for me.

Upvotes: 0

Views: 1917

Answers (1)

Oleg
Oleg

Reputation: 10676

The syntax you have to use is indicated in the documentation of batch():

j = batch(fcn,N,{x1, ..., xn})

and in your case

j = batch(fcn, 1, {input})

Alternatively, you can check How do I call MATLAB from the DOS prompt?

Upvotes: 1

Related Questions