I want to run several instances of matlab without running a parfor loop. The structure of my code is the following:
if k == 1
% Set some parameters here
elseif k == 2
% Set some other parameters here
...
elseif k == 10
%Set some other parameters here
end
Is there an efficient way of opening 10 instances of matlab where each instance will run for a given value of k?
I know that in a cluster with slurm I could use slurm arrays, i.e. I could add this to the beginning of the matlab code:
k = str2num(getenv('SLURM_ARRAY_TASK_ID'));
And then just to a batch submit. Anything similar that I could do on a normal computer?