Here is my code what i'm using opts = optimoptions(@fmincon,'Algorithm','sqp','TolFun',1e-16,'TolX',1e-16,'MaxFunEvals',100000,… 'MaxIter',100000,'Diagnostics','on','Display','iter');
X0 = [1 1 1 0.1593 14.8 1.75 1 0.12 1 0.0027 1.86 0.5]; LB = [1 1 1 0.1593 14.8 1.75 0 0.12 0 0.0027 1.86 0.5]; UB = [1 1 1 1 90 pi/2 1 0.05 0.5 0.05 10 1];
problem = createOptimProblem('fmincon','objective',@(K) Efficiency_new_normal_all(K,[sigmaef,AeffModef,PiTef,NredT,VGT,c,d,mred,etaTSef,… repmat([gamma,R,Din,Dout,Dnut,Dwheel,BladeH,FPosition(i),RendMean,beta,a0,a1],[length(PiTef),1]),z2angle,z3geom],,X0,LB,UB,opts));
gs = GlobalSearch; [xfinal2, f] = run(gs, problem);
Best Answer