pdeplot - Generic plot function

Syntax

pdeplot(p,e,t,'PropertyName',PropertyValue,) 
h=pdeplot(p,e,t,'PropertyName',PropertyValue,)

Description

pdeplot(p,e,t,p1,v1,...) is the generic Partial Differential Equation Toolbox™ plot function. It can display several functions of a PDE solution at the same time.

The geometry of the PDE problem is given by the mesh data p, e, and t. For details on the mesh data representation, see initmesh.

Valid property/value pairs include the following.

Property NameProperty Value/DefaultDescription

xydata

data

Triangle data

xystyle

off|flat|{interp}

x-y data plot style

contour

{off}|on

Show contours

zdata

data

Node or triangle data

zstyle

off|{continuous}| discontinuous

3-D height plot style

flowdata

data

Node or triangle data

flowstyle

off|{arrow}

Flow plot style

colormap

colormap cool

x-y data colormap name or colormap matrix

xygrid

{off}|on

Convert to x-y grid before plotting

gridparam

[tn; a2; a3]

Triangle index and interpolation parameters from earlier call to tri2grid

mesh

{off}|on

Show mesh in plot

colorbar

off|{on}

Show color bar

title

"

Plot title text

levels

10

Number of levels or a vector specifying levels

The pdeplot is used both from inside the pdetool GUI and from the command line. It is able to display three entities simultaneously. xydata can be visualized by a surface plot. Either flat or interpolated (default) shading can be used for the surface plots. A contour plot can be superimposed on the surface plot (in black) or plotted independently (in colors) by setting contour to on. zdata is visualized by displaying height. The triangles can be either tilted by interpolation (default) or flat. Flow data can be visualized by plotting arrows like the MATLAB® quiver plot. All data types can be either node data or triangle data (flow data can only be triangle data). Node data is represented by a column vector of length size(p,2) and triangle data is represented by a row vector of length size(t,2). If no xydata, zdata, or flowdata is supplied, pdeplot plots the mesh specified by p, e, and t.

The option mesh displays or hides (default) the triangle mesh in the plot. The option xygrid first converts the data to x-y data (using tri2grid), and then uses a standard MATLAB plotting algorithm. The property gridparam passes the tri2grid data to pdeplot. This speeds up animation (see pdedemo5 and pdedemo6). The property colormap renders the plot using any MATLAB colormap or color matrix. colorbar adds a color bar to the plot. title inserts a title into the plot. levels only applies to contour plots: Given a scalar integer value, it plots that number of equally spaced contour levels; given a vector of level values, it plots those contour lines on the levels in the vector.

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

Examples

The following command sequence plots the solution to Poisson's equation on the L-shaped membrane in 3-D.

[p,e,t]=initmesh('lshapeg'); 
u=assempde('lshapeb',p,e,t,1,0,1); 
pdeplot(p,e,t,'xydata',u,'zdata',u,'mesh','off');

See Also

pdecont

Partial Differential Equation Toolbox

pdegplot

Partial Differential Equation Toolbox

pdemesh

Partial Differential Equation Toolbox

pdesurf

Partial Differential Equation Toolbox

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS