### 17.3 Three-Dimensional Plotting

The Matlab-style three-dimensional plotting commands are:

— Function File: mesh (x, y, z)

> Plot a mesh given matrices x, and y from `meshdom` and a matrix z corresponding to the x and y coordinates of the mesh. If x and y are vectors, then a typical vertex is (x(j), y(i), z(i,j)). Thus, columns of z correspond to different x values and rows of z correspond to different y values.

— Function File: [xx, yy] = meshgrid (x, y)
— Function File: [xx, yy] = meshgrid (x)

> Given vectors of x and y coordinates, return two matrices corresponding to the x and y coordinates of a mesh. The rows of xx are copies of x, and the columns of yy are copies of y.

— Function File: meshdom (x, y)

> Given vectors of x and y coordinates, return two matrices corresponding to the x and y coordinates of the mesh.

> Note: this function is provided for compatibility with older versions of Matlab. You should use `meshgrid` instead.