Main Content

issimplified

Determine if polyshape is well-defined

Description

TF = issimplified(polyin) returns a logical array whose elements are 1 (true) if the corresponding elements of polyin are well-defined polygons. Well-defined polygons have boundaries that contain no intersections and are properly nested.

example

Examples

collapse all

Create a row vector of two polygons: one that is ill-defined, and one that is well-defined. Use the issimplified function to verify their status.

poly1 = polyshape(rand(20,2),'Simplify',false);
poly2 = polyshape(rand(20,2));
Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.
polyin = [poly1 poly2];
TF = issimplified(polyin)
TF = 1x2 logical array

   0   1

Input Arguments

collapse all

Input polyshape, specified as a scalar, vector, matrix, or multidimensional array.

Data Types: polyshape

Extended Capabilities

Version History

Introduced in R2017b