Main Content

Peaks function

returns the
`Z`

= peaks*z*-coordinates of the peaks function
evaluated over a 49-by-49 grid.

returns the peaks function evaluated at the points specified by `Z`

= peaks(`Xm`

,`Ym`

)`Xm`

and `Ym`

. The sizes of `Xm`

and
`Ym`

must be the same or be compatible. For example, you can specify `Xm`

and
`Ym`

as matrices in `meshgrid`

format.

`peaks(___)`

plots the peaks function as a
three-dimensional surface plot. You can use any of the input argument combinations in the
previous syntaxes.