how to plot 3-d objective function with my two variables with the fmincon algorithm use
5 ビュー (過去 30 日間)
古いコメントを表示
i am using surfc command but how to implent to it give iterative result vary with variables.Can any body help
xo=[0.001,0.005]; % assumptions
%[Q]=heatload1_new(xo)
%nvars=3;
A=[];
b=[];
Aeq=[];
beq=[];
lb=[0.0001,0.003]; %lower bound
ub=[0.01,0.08]; %upper bound
nonlincon = @(x)constraint_new(x); % calling constraint function
Fitnessfun =@(x)weight_testvariable(x); %calling objective function
options = optimoptions(@fmincon,'Display','iter-detailed','Algorithm','sqp','MaxIterations',1500)
options = optimset('Display','iter','TolFun',1e-6)
options = optimset('PlotFcns',@optimplotfval);
[X,fval]=fmincon(Fitnessfun,xo,[],[],[],[],lb,ub,nonlincon,options)
1 件のコメント
Walter Roberson
2019 年 8 月 22 日
What is to be plotted?
fmincon() would sort of follow a slope, and would at best produce a 3D line of output reflecting the points visited and their cost, not a surface.
Have a look at the option PlotFcn, perhaps 'optimplotx'
回答 (1 件)
Raunak Gupta
2019 年 8 月 28 日
Hi,
There is a similar question which may be of relevance to you:
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!