質問

How to minimize multivariate function in Matlab by using derivatives?

So far, for minimizing single variable functions I used fminunc, but now I need to work with multivariate functions.

Thank you

役に立ちましたか?

解決

Use fminunc. If you want to use the gradient, just return it as the 2nd output of your objective function. You'll also need to indicate in an options object that you are passing the gradient.

options = optimoptions('fminunc','GradObj','on');

I believe the documentation has info on passing the Hessian (if one exists).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top