title: Batch script for new instances of MATLAB
body: <p>I am trying to write a batch script which can call and run a MATLAB script in the following manner:</p>
  
  <pre><code>matlab -r plotFunction(a,b); quit %here, a=1:10 and b=1:10 
  matlab -r plotFunction(a,b); quit %in 2nd instance a=11:20, b=11:20
  matlab -r plotFunction(a,b); quit %in 3rd instance a=21:30, b=21:30 
  and so on.
  </code></pre>
  
  <p>That is, each time a new instance of MATLAB opens up, calls the function plotFunction which performs plotting a 100 times and then the program (MATLAB) quits. Subsequent to this, another instance of the program opens, performs plotting a 100 times again (corresponding to a=11:20 and b=11:20) and quits again. And so forth. How to put this in a loop?</p>