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.
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 Exchange에서 Problem-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