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?
5 件のコメント
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!