GlobalSearch and MultiStart Syntax
2 views (last 30 days)
Show older comments
Hi There
I want to use GlobalSearch and MultiStart for a parameter estimation problem using fmincon and lsqnonlin. The question is regarding the syntax. Both GlobalSearch for fmincon and MultiStart for lsqnonlin give the "not enough input argument " error. The objective function "Objective" that returns a value to fmincon has another function nested in it that gives the results of a set of ODEs. How do we add that in the createproblem of globalsearch or multistart, because the error point to that ode output function? Part of the code is written below.
Thanx
options=optimset('Algorithm','sqp','DiffMinChange',5,'MaxIter',7000,'MaxFunEvals',7000,'TolX',1e-10,'TolFun',1e-10,'ObjectiveLimit',1e-12);
lb=[0 0 0 0 0 0 0 0 0 0 0 0 0 0];
ub=[inf inf inf inf inf inf inf inf inf inf inf inf inf inf];
A=[];
b=[];
Aeq=[];
beq=[];
problem=createOptimProblem('fmincon','objective',Objective,'A',A0,'lb',lb,'ub',ub,'Aineq',A,'bineq',b,'Aeq',Aeq,'beq',beq,'options',options);
gs = GlobalSearch;
[xmin,Fmin] = run(gs,problem)
[Parameters,fval,exitflag,output]=fmincon(@(A) Objective (wd,fd,A),A0,A,b,Aeq,beq,lb,ub,nonlcon,options);
0 Comments
Answers (1)
Alan Weiss
on 30 Jun 2014
Can you run fmincon alone without a syntax error? If not, get that debugged first. If so, then please show us exactly what MATLAB returns as the error when you try to run GlobalSearch or MultiStart, and exactly what Objective is in the createOptimProblem argument.
One other thing. It seems that you use A as both the anonymous function parameter and the linear inequality matrix. Perhaps this is an error, but perhaps not.
Alan Weiss
MATLAB mathematical toolbox documentation
4 Comments
See Also
Categories
Find more on Global or Multiple Starting Point Search in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!