Optimizing With User Specified Gradients

1 次查看(过去 30 天)
I am trying to use fmincon/fminunc but provide the analytical gradient. Example code tells me to use options like the following:
options = optimoptions('fmincon','SpecifyObjectiveGradient',true);
When I do so I receive the error: 'SpecifyObjectiveGradient' is not an option for FMINCON.
I use matlab 2015b.
I am looking for the simplest possible self contained example of specifying a gradient for use in optimization.

回答(1 个)

Walter Roberson
Walter Roberson 2016-6-14
You are looking at the R2016a documentation. If you look at the R2015b documentation you will see GradObj and GradConstr rather than SpecifyObjectiveGradient and SpecifyConstraintGradient

类别

Help CenterFile Exchange 中查找有关 Problem-Based Optimization Setup 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by