필터 지우기
필터 지우기

Minimizing a function using the BFGS method

조회 수: 1 (최근 30일)
amine&&
amine&& 2016년 7월 7일
편집: amine&& 2016년 7월 8일
I can not minimize it using the fminunc function. While respecting that both alpha and beta values are between 0 and 1. Thanks!

답변 (1개)

John D'Errico
John D'Errico 2016년 7월 7일
편집: John D'Errico 2016년 7월 7일
You cannot do so using BFGS either. However, you COULD use FMINCON to do so. And if you have fminunc, then you have fmincon.
So what is the point of this question? In fact, you have no question here that I see. Writing your own tools for something when you already have professionally written tools to do the same thing is just a waste of time.
  댓글 수: 8
John D'Errico
John D'Errico 2016년 7월 7일
Torsten showed you how to do it.
You made a mistake in not formulating your function properly. First, an optimizer passes in a vector of unknowns. Your function has TWO arguments, two unknowns. So Torsten showed you that the function needs to be passed its arguments properly.
Next, when you call it like this:
x = fmincon(mFunction,x0,A,b,Aeq,beq)
MATLAB does not understand that you want to pass a function to fmincon. It sees the function and tries to evaluate it instead. So Torsten showed you how to use a function handle.
amine&&
amine&& 2016년 7월 7일
Thanks Jhon for your help!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by