Main Content


Analytic 2-D geometry description


AnalyticGeometry describes a 2-D geometry in the form of an analytic geometry object. PDEModel, StructuralModel, and ThermalModel objects have a Geometry property, which can be an AnalyticGeometry or DiscreteGeometry object.


Add a 2-D analytic geometry to your model by using decsg to create the geometry and geometryFromEdges to attach it to the model.


expand all

Number of geometry edges, specified as a positive integer.

Data Types: double

Number of geometry faces, specified as a positive integer. If your geometry is one connected region, then NumFaces = 1.

Data Types: double

Number of geometry vertices, specified as a positive integer.

Data Types: double

Coordinates of geometry vertices, specified as an N-by-2 numeric matrix where N is the number of vertices.

Data Types: double

Object Functions

faceEdgesFind edges belonging to specified faces
facesAttachedToEdgesFind faces attached to specified edges
nearestEdgeFind edges nearest to specified point
nearestFaceFind faces nearest to specified point


collapse all

Create a decomposed solid geometry model representing a rectangle and include it in a PDE model.

Create a default scalar PDE model.

model = createpde;

Define a geometry representing a rectangle.

R1 = [3,4,-1,1,1,-1,0.5,0.5,-0.75,-0.75]';

Decompose the geometry into minimal regions.

g = decsg(R1);

Create the geometry from the decomposed geometry matrix.


Plot the geometry.

axis equal

Figure contains an axes object. The axes object contains 5 objects of type line, text.

Version History

Introduced in R2015a