Main Content

pdecont

(Removed) Contour plot of PDE node or triangle data

pdecont has been removed. Use pdeplot instead. For information on updating your code, see Version History.

Description

pdecont(p,t,u) creates a contour plot of node data or triangle data. By default, pdecont uses 10 levels for a contour plot. The p and t arguments specify the geometry of the PDE problem.

If u is a column vector, pdecont treats it as a node data. If u is a row vector, pdesurf treats it as a triangle data.

pdecont(p,t,u,n) plots n levels.

pdecont(p,t,u,v) plots levels at the solution heights specified by v.

h = pdecont(___) uses any of the previous syntaxes and 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

Number of levels, specified as a positive integer.

Data Types: double

Levels to plot, specified as a vector of heights.

Data Types: double

Output Arguments

collapse all

Handles to graphics objects, returned as a vector.

Tips

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

Version History

Introduced before R2006a

expand all

R2024a: Errors

The pdecont function has been removed.

To update your code for plotting the default 10 levels u, change instances of the function call pdecont(p,t,u) to the function call:

pdeplot(p,[],t,'XYData',u,'XStyle','off', ...
               'Contour','on','ColorBar','off')

To update your code for plotting the first n levels, change instances of the function call pdecont(p,t,u,n) to the function call:

pdeplot(p,[],t,'XYData',u,'XStyle','off', ...
               'Contour','on','Levels',n, ...
               'ColorBar','off')

To update your code for plotting levels specified as a vector v, change instances of the function call pdecont(p,t,u,v) to the function call:

pdeplot(p,[],t,'XYData',u,'XStyle','off', ...
               'Contour','on','Levels',v, ...
               'ColorBar','off')

pdeplot gives you more control over your contour 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

|