# pdecont

(To be removed) Contour plot of PDE node or triangle data

`pdecont` will be removed in a future release. Use `pdeplot` instead. For more information, see Compatibility Considerations.

## Syntax

``pdecont(p,t,u)``
``pdecont(p,t,u,n)``
``pdecont(p,t,u,v)``
``h = pdecont(___)``

## Description

example

````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.```

example

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

example

````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.```

## Examples

collapse all

Plot contours of the solution to the equation $-\Delta u=1$ on the L-shaped membrane using the `pdecont` function.

First, create and refine a `[p,e,t]` mesh on the L-shaped membrane.

```[p,e,t] = initmesh('lshapeg'); [p,e,t] = refinemesh('lshapeg',p,e,t);```

Solve the equation using the Dirichlet boundary conditions $u=0$ on $\partial \Omega$.

`u = assempde('lshapeb',p,e,t,1,0,1);`

Plot the solution using the `pdesurf` function.

`pdesurf(p,t,u)`

Plot contours of the solution using the `pdecont` function. By default, there are 10 levels.

`pdecont(p,t,u)`

Now plot the contours using three levels.

`pdecont(p,t,u,3)`

Plot the contours of the solution at the heights 0, 0.05, 0.1, and 0.14.

`pdecont(p,t,u,[0 0.05 0.1 0.14])`

## 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.

## Version History

Introduced before R2006a

expand all