How can I save the value of each decision variable in each iteration in using fmincon MATLAB
3 次查看(过去 30 天)
显示 更早的评论
I uesed this code to find the optimal value of 3 decision variables, But I want to plot the optimization process, and I need the value of each decision variable in each iteration,
x0=[1;1;1]; % Starting guess
lb=[0.5;0.5;0.5];
ub=[1.25;1.27;4];
options = optimoptions('fmincon','Display','iter','Algorithm','interior-point','Tolx',1e-15,'Tolfun',1e-16,'MaxFunEvals',600,'MaxIter',100);
[x,fval,exitflag,output]=fmincon(@optim,x0,[],[],[],[],lb,ub,[],options)
When I used ,'outputfcn',@outfun, in the options I get error
is there any way that I can check the value of decision variables in each iteration?
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!