peaks
Built-in 2D test surface (Gaussian-mixture peaks).
Syntax
Section titled “Syntax”[X, Y, Z] = peaks[X, Y, Z] = peaks(n)Z = peaks(X, Y)Description
Section titled “Description”Returns a 49×49 sample of MATLAB’s classic peaks function — a sum of translated Gaussians used for demoing 3D surface plotting. Pass n for an n × n grid; pass coordinate matrices to evaluate at custom points.
Example
Section titled “Example”surf(peaks(50)) % the canonical demo