Plot Graph using fmincon
古いコメントを表示
Hi i just can't seem to figure out how to plot a graph using fmincon. I am doing an optimization with my function:
fun =@(x) (R_f(Cm,Cwp,Abt,V,x(4),x(1),x(2),x(3)) * k_1(Cm,x(3),x(4),Cstern,x(1),x(2))) + R_w(Cwp,x(4),Abt,hb,Cm,At,x(1),x(2),x(3)) + R_b(Abt,hb,V,x(1),x(2),x(3)) + R_tr(Cwp,At,V,x(1),x(3)) + R_a(Cm,Cwp,Abt,V,hb,x(4),x(1),x(2),x(3));
lb=[2.5,1.5,150,30000];
ub=[5,3.5,250,50000]; A=[];
bt=[];
Aeq=[];
beq=[];
nonlincon = [];
options = optimoptions(@fmincon,'Algorithm','interior-point',...
'SpecifyObjectiveGradient',true,'SpecifyConstraintGradient',true,'PlotFcn',{@optimplotx,...
@optimplotfval,@optimplotfirstorderopt});
[x,fval] = fmincon(fun,x0,A,bt,Aeq,beq,lb,ub,nonlincon,options);
can i please get some help here.
6 件のコメント
Walter Roberson
2018 年 4 月 19 日
Please post enough to reproduce -- e.g., R_f and Cm, Cwp, etc.
Yun Yong Lin
2018 年 4 月 19 日
Walter Roberson
2018 年 4 月 19 日
We need your complete code, along with any data files you use.
Yun Yong Lin
2018 年 4 月 19 日
Matt J
2018 年 4 月 19 日
How do we know if we've fixed it? What result do you see now? What should you see?
Walter Roberson
2018 年 4 月 19 日
Undefined function or variable 'x0'. Error in Main (line 60) [x,fval,exitflag] = fmincon(fun,x0,A,bt,Aeq,beq,lb,ub,nonlincon,options);
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Spline Postprocessing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!