The problem goes as follows:
find the optima for Branin's function using MATLAB
f=@(x1,x2) (x2-(5.1/(4*pi^2))*x1^2+(5/pi)*x1-6)^2+10*(1-(1/(8*pi)))*cos(x1)+10;
where -5<=x1<=10, 0<=x2<=15
How do I optimize (minimize) this multivariable constraint function?
Thanks for the help

1 件のコメント

Matt J
Matt J 2018 年 4 月 20 日
x = fmincon(@(p) f(p(1),p(2)) ,x0,A,b,Aeq,beq,lb,ub);

サインインしてコメントする。

 採用された回答

Matt J
Matt J 2018 年 4 月 18 日

0 投票

FMINCON would be applicable.

3 件のコメント

Nick Chatz
Nick Chatz 2018 年 4 月 18 日
Thank you, fmincon is what I'm trying to use. The thing is I'm not sure on how i define the different constraints for each variable.
Matt J
Matt J 2018 年 4 月 18 日
Your constraints are simple bounds, so you would use the lb,ub arguments described in the documentation
x = fmincon(fun,x0,A,b,Aeq,beq,lb,ub);
here lb=[-5,0], ub=[10,15].
Nick Chatz
Nick Chatz 2018 年 4 月 18 日
Thanks a lot

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeProblem-Based Optimization Setup についてさらに検索

質問済み:

2018 年 4 月 18 日

コメント済み:

2018 年 4 月 20 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by