[xo,Ot,nS]=hkjeeves('test1',[-1.2 1],1) Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Warning Hkjeeves: reached maximum number of stages! xo = 0.6857 0.4698 Ot = 0.0988 nS = 277 help univar Unconstrained optimization using univariate search (Coggins and Gold Section). [xo,Ot,nS]=univar(S,x0,ip,method,Lb,Ub,problem,tol,mxit) S: objective function x0: initial point ip: (0): no plot (default), (>0) plot figure ip with pause, (<0) plot figure ip method: (0) Coggins (default), (1): Golden Section Lb, Ub: lower and upper bound vectors to plot (default = x0*(1+/-2)) problem: (-1): minimum (default), (1): maximum tol: tolerance (default = 1e-4) mxit: maximum number of stages (default = 50*(1+4*~(ip>0))) xo: optimal point Ot: optimal value of S nS: number of objective function evaluations [xo,Ot,nS]=univar('test1',[-1.2 1],1) Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Error in ==> V:\cursos\pos\otimiza\aulas\univar.m On line 97 ==> disp('Pause: hit any key to continue...'); pause; help univar Unconstrained optimization using univariate search (Coggins and Gold Section). [xo,Ot,nS]=univar(S,x0,ip,method,Lb,Ub,problem,tol,mxit) S: objective function x0: initial point ip: (0): no plot (default), (>0) plot figure ip with pause, (<0) plot figure ip method: (0) Coggins (default), (1): Golden Section Lb, Ub: lower and upper bound vectors to plot (default = x0*(1+/-2)) problem: (-1): minimum (default), (1): maximum tol: tolerance (default = 1e-4) mxit: maximum number of stages (default = 50*(1+4*~(ip>0))) xo: optimal point Ot: optimal value of S nS: number of objective function evaluations [xo,Ot,nS]=univar('test1',[-1.2 1],0,0,[],[],[],[],2000) xo = 0.9746 0.9499 Ot = 6.4380e-004 nS = 16732 help hkjeeves Unconstrained optimization using Hooke & Jeeves. [xo,Ot,nS]=hkjeeves(S,x0,ip,Lb,Ub,problem,tol,mxit,stp,amp,red) S: objective function x0: initial point ip: (0): no plot (default), (>0) plot figure ip with pause, (<0) plot figure ip Lb, Ub: lower and upper bound vectors to plot (default = x0*(1+/-2)) problem: (-1): minimum (default), (1): maximum tol: tolerance (default = 1e-4) mxit: maximum number of stages (default = 50*(1+4*~(ip>0))) stp: stepsize vector for the independent variables (default = max(0.01*abs(x0+~x0),0.1)) amp: stepsize enlargement factor (1,oo) (default = 1.5) red: stepsize reduction factor (0,1) (default = 0.5) xo: optimal point Ot: optimal value of S nS: number of objective function evaluations [xo,Ot,nS]=hkjeevs('test1',[-1.2 1],0,[],[],[],[],2000) ??? Undefined function or variable 'hkjeevs'. [xo,Ot,nS]=hkjeeves('test1',[-1.2 1],0,[],[],[],[],2000) xo = 0.9787 0.9578 Ot = 4.5467e-004 nS = 2665 [xo,Ot,nS]=hkjeeves('test1',[-1.2 1],1) Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Error in ==> V:\cursos\pos\otimiza\aulas\hkjeeves.m On line 117 ==> disp('Pause: hit any key to continue...'); pause; dir r* READ2.m restr.m restr15.m restr20.m reactor_opt.gPROMS restr1.m restr16.m rosembr.m refino.m restr14.m restr17.m help rosembr Unconstrained optimization using Rosembrock. [xo,Ot,nS]=rosembr(S,x0,ip,Lb,Ub,problem,tol,mxit,stp,amp,red) S: objective function x0: initial point ip: (0): no plot (default), (>0) plot figure ip with pause, (<0) plot figure ip Lb, Ub: lower and upper bound vectors to plot (default = x0*(1+/-2)) problem: (-1): minimum (default), (1): maximum tol: tolerance (default = 1e-4) mxit: maximum number of stages (default = 50*(1+4*~(ip>0))) stp: stepsize vector for the independent variables (default = max(0.01*abs(x0+~x0),0.1)) amp: stepsize enlargement factor (1,oo) (default = 3) red: stepsize reduction factor (0,1) (default = 0.5) xo: optimal point Ot: optimal value of S nS: number of objective function evaluations [xo,Ot,nS]=rosembr('test1',[-1.2 1],1) Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... xo = 1.0000 1.0000 Ot = 3.5519e-010 nS = 345 type powelç ??? Error using ==> type powelç.m: File not found. type powell function [xo,Ot,nS]=powell(S,x0,ip,method,Lb,Ub,problem,tol,mxit) % Unconstrained optimization using Powell. % % [xo,Ot,nS]=powell(S,x0,ip,method,Lb,Ub,problem,tol,mxit) % % S: objective function % x0: initial point % ip: (0): no plot (default), (>0) plot figure ip with pause, (<0) plot figure ip % method: (0) Coggins (default), (1): Golden Section % Lb, Ub: lower and upper bound vectors to plot (default = x0*(1+/-2)) % problem: (-1): minimum (default), (1): maximum % tol: tolerance (default = 1e-4) % mxit: maximum number of stages (default = 50*(1+4*~(ip>0))) % xo: optimal point % Ot: optimal value of S % nS: number of objective function evaluations % Copyright (c) 2001 by LASIM-DEQUI-UFRGS % $Revision: 1.0 $ $Date: 2001/07/07 21:10:15 $ % Argimiro R. Secchi (arge@enq.ufrgs.br) if nargin < 2, error('rosembr requires two input arguments'); end if nargin < 3 | isempty(ip), ip=0; end if nargin < 4 | isempty(method), method=0; end if nargin < 5 | isempty(Lb), Lb=-x0-~x0; end if nargin < 6 | isempty(Ub), Ub=2*x0+~x0; end if nargin < 7 | isempty(problem), problem=-1; end if nargin < 8 | isempty(tol), tol=1e-4; end if nargin < 9 | isempty(mxit), mxit=50*(1+4*~(ip>0)); end x0=x0(:); y0=feval(S,x0)*problem; n=size(x0,1); D=eye(n); ips=ip; if ip & n == 2, figure(abs(ip)); [X1,X2]=meshgrid(Lb(1):(Ub(1)-Lb(1))/20:Ub(1),Lb(2):(Ub(2)-Lb(2))/20:Ub(2)); [n1,n2]=size(X1); f=zeros(n1,n2); for i=1:n1, for j=1:n2, f(i,j)=feval(S,[X1(i,j);X2(i,j)]); end end mxf=max(max(f)); mnf=min(min(f)); df=mnf+(mxf-mnf)*(2.^(([0:10]/10).^2)-1); [v,h]=contour(X1,X2,f,df); hold on; % clabel(v,h); h1=plot(x0(1),x0(2),'ro'); legend(h1,'start point'); if ip > 0, ips=ip+1; disp('Pause: hit any key to continue...'); pause; else ips=ip-1; end end xo=x0; yo=y0; it=0; nS=1; while it < mxit, % exploration delta=0; for i=1:n, if method, % to see the linesearch plot, remove the two 0* below [stepsize,x,Ot,nS1]=aurea(S,xo,D(:,i),0*ips,problem,tol,mxit); Ot=Ot*problem; else [stepsize,x,Ot,nS1]=coggins(S,xo,D(:,i),0*ips,problem,tol,mxit); Ot=Ot*problem; end nS=nS+nS1; di=Ot-yo; if di > delta, delta=di; k=i; end if ip & n == 2, plot([x(1) xo(1)],[x(2) xo(2)],'r'); if ip > 0, disp('Pause: hit any key to continue...'); pause; end end yo=Ot; xo=x; end % progression it=it+1; xo=2*x-x0; Ot=feval(S,xo)*problem; nS=nS+1; di=y0-Ot; j=0; if di >= 0 | 2*(y0-2*yo+Ot)*((y0-yo-delta)/di)^2 >= delta, if Ot >= yo, yo=Ot; else xo=x; j=1; end else if k < n, D(:,k:n-1)=D(:,k+1:n); end D(:,n)=(x-x0)/norm(x-x0); if method, % to see the linesearch plot, remove the two 0* below [stepsize,xo,yo,nS1]=aurea(S,x,D(:,n),0*ips,problem,tol,mxit); yo=yo*problem; else [stepsize,xo,yo,nS1]=coggins(S,x,D(:,n),0*ips,problem,tol,mxit); yo=yo*problem; end nS=nS+nS1; end if ip & n == 2 & ~j, plot([x(1) xo(1)],[x(2) xo(2)],'r'); if ip > 0, disp('Pause: hit any key to continue...'); pause; end end if norm(xo-x0) < tol*(0.1+norm(x0)) & abs(yo-y0) < tol*(0.1+abs(y0)), break; end y0=yo; x0=xo; end Ot=yo*problem; if it == mxit, disp('Warning Powell: reached maximum number of stages!'); elseif ip & n == 2, h2=plot(xo(1),xo(2),'r*'); legend([h1,h2],'start point','optimum'); end help powell Unconstrained optimization using Powell. [xo,Ot,nS]=powell(S,x0,ip,method,Lb,Ub,problem,tol,mxit) S: objective function x0: initial point ip: (0): no plot (default), (>0) plot figure ip with pause, (<0) plot figure ip method: (0) Coggins (default), (1): Golden Section Lb, Ub: lower and upper bound vectors to plot (default = x0*(1+/-2)) problem: (-1): minimum (default), (1): maximum tol: tolerance (default = 1e-4) mxit: maximum number of stages (default = 50*(1+4*~(ip>0))) xo: optimal point Ot: optimal value of S nS: number of objective function evaluations [xo,Ot,nS]=powell('test1',[-1.2 1],1,0) Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... xo = 1.0000 1.0000 Ot = 1.7272e-011 nS = 503 help complex Unconstrained optimization using Extended Flexible Polyhedron. [xo,So,nS] = complex(S,x0,ip,Lb,Ub,problem,tol,mxit,edge,r,P1,...,P10) S: objective function x0: initial point ip: (0): no plot (default), (>0) plot figure ip with pause, (<0) plot figure ip Lb, Ub: lower and upper bound vectors to plot (default = x0*(1+/-2)) problem: (-1): minimum (default), (1): maximum tol: tolerance (default = 1e-4) mxit: maximum number of stages (default = 50*(1+4*~(ip>0))) edge: initial size of the edges (default = max(0.01*norm(x0),0.1)) r: extra number of vertices (default = 0) xo: optimal point Ot: optimal value of S nS: number of objective function evaluations P1,...,P10: variable arguments [xo,So,nS] = complex('test1',[-1.2 1],1) Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Pause: hit any key to continue... Warning Complex: reached maximum number of iteration xo = 0.3556 0.0996 So = 0.4872 nS = 90 help complex Unconstrained optimization using Extended Flexible Polyhedron. [xo,So,nS] = complex(S,x0,ip,Lb,Ub,problem,tol,mxit,edge,r,P1,...,P10) S: objective function x0: initial point ip: (0): no plot (default), (>0) plot figure ip with pause, (<0) plot figure ip Lb, Ub: lower and upper bound vectors to plot (default = x0*(1+/-2)) problem: (-1): minimum (default), (1): maximum tol: tolerance (default = 1e-4) mxit: maximum number of stages (default = 50*(1+4*~(ip>0))) edge: initial size of the edges (default = max(0.01*norm(x0),0.1)) r: extra number of vertices (default = 0) xo: optimal point Ot: optimal value of S nS: number of objective function evaluations P1,...,P10: variable arguments [xo,So,nS] = complex('test1',[-1.2 1],-1,[],[],[],[],2000) xo = 1.0000 1.0001 So = 5.5416e-009 nS = 196 tic [xo,So,nS] = complex('test1',[-1.2 1],0,[],[],[],[],2000); toc elapsed_time = 19.3280 tic t1=toc t1 = 5.7880 quit