MATLAB Help Center
Number of polyshape boundaries
polyshape
N = numboundaries(polyin)
N = numboundaries(polyin) returns the number of boundaries of a polyshape object.
polyin
example
collapse all
Create a polygon and determine its number of boundaries.
x1 = [0 1 2]; y1 = [0 1 0]; x2 = [2 3 4]; y2 = [1 2 1]; polyin = polyshape({x1,x2},{y1,y2}); plot(polyin)
N = 2
Input polyshape, specified as a scalar, vector, matrix, or multidimensional array.
Data Types: polyshape
expand all
Usage notes and limitations:
Dynamic memory allocation must be enabled for code generation.
Introduced in R2017b
polyshape | numsides | boundary
numsides
boundary
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
Europe
Asia Pacific
Contact your local office