필터 지우기
필터 지우기

Optimization of one output of a vectorfunction using fminunc

조회 수: 1 (최근 30일)
Hi!
Last time I got a very helpful idea. Now I defined a vectorfunction which has several variables x1,x2,x3,u1,u2 and also several outputs y1,y2,y3,...,yN. Now I would like to optimize only one output, i.e. I optimize f.ex. only y3. In my case y3 is a function that I get from y1,y2... .
I tried to find the answer, but mostly fminunc were used to optimize y or y1,y2,y3,..... What is the command in the fminunc solver to optimize only one output?
Thanks

채택된 답변

Sean de Wolski
Sean de Wolski 2015년 2월 3일
Inside of your objective function, only return that output:
function y3 = myobjfun(x)
% do whatever
y3 = something;
end
  댓글 수: 5
Michael Haderlein
Michael Haderlein 2015년 2월 4일
Your efficiency function obviously returns an array. It must be a scalar though. Maybe you actually want to optimize w.r.t. norm(efficiency)?
Antonio Sereira
Antonio Sereira 2015년 2월 4일
Hi!
I solved the problem. Thanks!!!

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

추가 답변 (0개)

카테고리

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