mesh

Creates mesh in an axes and returns handles of the mesh.

Syntax

h = mesh(x, y, z)

h = mesh(z)

h = mesh(..., color)

h = mesh(..., property, value, ...)

h = mesh(hAxes, ...)

Inputs

x, y, z
Range of the x, y and z axes.
Type: double | integer
Dimension: scalar | vector | matrix
color
Color of mesh.
Type: double | integer | string
Dimension: scalar | vector
property
Properties that control the appearance or behavior of the graphics object .
Type: string
Dimension: scalar
value
Value of properties.
Type: double | integer | string
Dimension: scalar | vector
hAxes
Axis handle.
Type: double
Dimension: scalar

Outputs

h
Handle of the mesh graphics object.

Example

Simple mesh example.

clf;
x=[0:0.1:2*pi];
y=x;
z=sin(x')*cos(y);
mesh(x, y, z)
Figure 1. Mesh plot

Comments

If there is no axes, one will be created first. If x and y are omitted, the index of the columns of z is used for x coordinates and the index of the rows of z is used for y coordinates. mesh takes optional arguments to control the surafce style. It can be either the color of the mesh (not supported yet), or property/value pair(s), or both.