Main Content

pdesurf

(Removed) Surface plot of PDE node or triangle data

pdesurf has been removed. Use pdeplot instead. For information on updating your code, see Compatibility Considerations.

Description

pdesurf(p,t,u) plots a 3-D surface using PDE node or triangle data as a height for a 2-D problem. The p and t arguments specify the geometry of the PDE problem.

If u is a column vector, pdesurf treats it as node data and uses continuous style and interpolated shading. If u is a row vector, pdesurf treats it as triangle data and uses discontinuous style and flat shading.

h = pdesurf(p,t,u) returns handles to the drawn axes objects.

Input Arguments

collapse all

Mesh points, specified as a 2-by-Np matrix of points, where Np is the number of points in the mesh. For details on the mesh data representation, see initmesh.

Data Types: double

Mesh triangles, specified as a 4-by-Nt matrix of triangles, where Nt is the number of triangles in the mesh. For details on the mesh data representation, see initmesh.

Data Types: double

PDE solution, specified as a vector.

The pdesurf function treats a column vector as node data and uses continuous style and interpolated shading. The function treats a row vector as triangle data and uses discontinuous style and flat shading.

Data Types: double

Output Arguments

collapse all

Handles to graphics objects, returned as a vector.

Tips

  • For more control over a surface plot, use the pdeplot function.

Version History

Introduced before R2006a

expand all

R2024a: Errors

The pdesurf function has been removed.

To update your code for plotting a solution u at nodes, change instances of the function call pdesurf(p,t,u) to the function call:

pdeplot(p,[],t,'XYData',u,'ZData',u,'ColorBar','off')

To update your code for plotting a solution ut at midpoints of mesh triangles, change instances of the function call pdecont(p,t,ut) to the function call:

pdeplot(p,[],t,'XYData',ut,'XStyle','flat', ...
               'ZData',ut,'ZStyle','discontinuos', ...
               'ColorBar','off')

pdeplot gives you more control over your surface plot.

Note that the legacy workflow that uses the [p,e,t] mesh is not recommended. New features might not be compatible with this legacy workflow. For description of the mesh data in the recommended workflow, see Mesh Data.

See Also

|