Mesh Surface Plot in MATLAB
Mesh Surface Plot is used to depict f(X, Y, Z) in a three-dimensional space. Matlab allows users to create mesh surface plots using the mesh() method.
Different syntax of mesh() method are:
- Mesh(X, Y, Z)
- Mesh(___, Name, Value)
- S = mesh()
Mesh(X, Y, Z)
- It plots X, Y, Z on a three-dimensional surface.
- Matrices X, Y are plotted along the x-y plane and plots matrix Z as height above the x-y plane.
- If size(Z) = [m, n], then X should be of the same size as Z or a vector of size n.
- Y should be the same size as Z or a vector of size m.
It creates a mesh surface plot with matrix Z by considering column and row indices as x and y-coordinates respectively.
- It creates a mesh surface plot with the specified color of edges as C.
- C is an m-by-n-by-3 of RGB array where Z is a matrix of size m-by-n.
Mesh(___, Name, Value)
- It creates a mesh surface plot with the specified Name-Value pair arguments.
- Some properties are Face Alpha, Edge Color, Line Style etc.
S = mesh(___)
- It creates a mesh plot with specified variables and returns the chart surface objects of the mesh plot.
- You can modify the mesh plot even after creating the plot using the variables.
Properties of mesh plot :
This function is used to specify axes in the mesh plot instead of current axes.