This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Draw polygon

pdepoly opens the PDE Modeler app and draws a polygon. If, instead, you want to draw polygons in a MATLAB® figure, use the plot function such as x = [-1,-0.5,-0.5,0,1.5,-0.5,-1];y = [-1,-1,-0.5,0,0.5,0.9,-1];plot(x,y,'.-').




pdepoly(x,y) draws a polygon with corner coordinates defined by x and y. If the PDE Modeler app is not active, it is automatically started, and the polygon is drawn in an empty geometry model.

The optional argument label assigns a name to the polygon (otherwise a default name is chosen).

The state of the Geometry Description matrix inside the PDE Modeler app is updated to include the polygon. You can export the Geometry Description matrix from the PDE Modeler app by using the Export Geometry Description option from the Draw menu. For a details on the format of the Geometry Description matrix, see decsg.


The command

pdepoly([-1 0 0 1 1 -1],[0 0 1 1 -1 -1]); 

creates the L-shaped membrane geometry as one polygon.

Introduced before R2006a

Was this topic helpful?