Error in optimset function

1 次查看(过去 30 天)
I am taking Machine Learning course from Coursera. When I run the code in MATLAB(R2017), I am getting error in some optimset function. Error is copied below:
Error using optimset (line 255) Unrecognized parameter name 'GradObj'. Please see the optimset reference page in the documentation for a list of acceptable option parameters. Link to reference page.
How do I resolve this issue.
Regards Ridhima Kumar
  3 个评论
Ridhima Kumar
Ridhima Kumar 2017-10-24
That is a pre written code by Coursera
KSSV
KSSV 2017-10-24
You check with the version course era people used and your version....

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2017-10-24
GradObj is not a valid option to optimset() unless a license is present for one of the following products:
Optimization Toolbox
Curve Fitting Toolbox
Statistics and Machine Learning Toolbox
Computer Vision Toolbox
System Identification Toolbox
  4 个评论
Walter Roberson
Walter Roberson 2018-10-22
Which optimization routine are you trying to call?
Nayana Sharma
Nayana Sharma 2018-11-20
Hi Animesh, you can remove the parameter GradObj and its value 'on' from the list of parameters for optimset function, and the code runs without error. i.e. just use options = optimset('MaxIter', 400);
Hope this helps.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with Optimization Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by