I would like to use parallel fmincon. The function receivea an input vector X, generates a file name say Filei.txt (i.e. File1.txt, File2.txt, File3.txt,... at each iteration), runs a external program for the file, and will produce an out put y.
function y= f(X)
name=strcat( 'File.' ,num2str(count),'.txt');
I would like to use the parallel Fmincon to minimize this function. However, I know that I can not use persisten with parallel fmincon to generate the variable 'count'. Could you please suggest what should I do in this case?