peaksFunc
Peaks function's value, gradient and Hessian.
Contents
Syntax
- out = peaksFunc(x, y)
- out = peaksFunc(x, y, mode)
Description
out = peaksFunc(x, y, 0) return the value of the peaks function
out = peaksFunc(x, y, 1) return the gradient of the peaks function
out = peaksFunc(x, y, 2) return the Hessian of the peaks function
This function is mainly used in gradientDescentDemo.m. All the derivatives were found by using Symbolic Math Toolbox. See the end of this file for details.
Example
gradientDescentDemo
![](peaksFunc_help_01.png)