Why do I get an error when setting optimization options according to the online documentation?

4 views (last 30 days)
When I set optimization options using online documentation, I get an error similar to one of the following:
 
Error using optimoptions (line 105)
'SpecifyObjectiveGradient' is not an option for FMINUNC.
A list of options can be found on the FMINUNC documentation page.
 
or
 
Error using optimset (line 213)
Unrecognized parameter name 'SpecifyObjectiveGradient'.  Please see the options table in
the documentation for a list of acceptable option parameters. Note that some parameters
are only supported by OPTIMOPTIONS. Link to options table
 

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 21 Apr 2021
Edited: MathWorks Support Team on 4 Mar 2021
The online documentation is for the latest MATLAB version. Many option names changed in R2016a. So you get an error when you use an R2016a option name in earlier versions.
 
To obtain documentation relevant for your MATLAB version, use the installed documentation. To do so, enter at the command line
doc
 
You can also see online documentation for older versions in the archived documentation (login required):
 
For information about changes in option names in R2016a, see

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Tags

No tags entered yet.

Products


Release

R2016a

Community Treasure Hunt

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

Start Hunting!