MATLAB: Error in optimset function

# gradobjoptimset

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

Best Answer

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