MATLAB: Do I receive an error when I use the PDEPOLY function from the Partial Differential Equation Toolbox on the data

Partial Differential Equation Toolboxpdepdepolyscale

I receive an error when I use the PDEPOLY function from the Partial Differential Equation Toolbox on my data.

Best Answer

pdepoly(x,y)
draws a polygon with corner coordinates defined by 'x' and 'y'. The state of the Geometry Description matrix inside PDETOOL is updated to include the polygon.
For example, the following code creates the L-shaped membrane geometry as one polygon:
pdepoly([-1 0 0 1 1 -1],[0 0 1 1 -1 -1]);
When the data 'x,y' is not centered and scaled, it may result in a polygon chain that is somewhat badly scaled due to an imposed translation of the geometry. In such cases, centering the coordinates around the origin usually works well:
pdepoly(x'-mean(x),y'-mean(y))
If the mesh of the geometry is somewhat affected by the "closeness" of two points in the polygon chain, try removing one of the points.