Вопрос

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