surf
3D surface plot with colored faces.
Syntax
Section titled “Syntax”h = surf(Z)h = surf(X, Y, Z)h = surf(X, Y, Z, C, ...)Description
Section titled “Description”Renders a 3D parametric surface from (X, Y, Z) grid data. With only Z, uses the row/column indices as X and Y. Optional C provides per-vertex color values; without C, the surface is colored by Z.
Examples
Section titled “Examples”[X, Y] = meshgrid(-3:0.1:3);Z = peaks(X, Y);surf(X, Y, Z)