Main Content

numboundaries

説明

N = numboundaries(polyin) は、polyshape オブジェクトの境界の数を返します。

すべて折りたたむ

多角形を作成し、その境界の数を判別します。

x1 = [0 1 2];
y1 = [0 1 0];
x2 = [2 3 4];
y2 = [1 2 1];
polyin = polyshape({x1,x2},{y1,y2});
plot(polyin)

Figure contains an axes object. The axes object contains an object of type polygon.

N = numboundaries(polyin)
N = 2

入力引数

すべて折りたたむ

入力 polyshape。スカラー、ベクトル、行列または多次元配列として指定します。

データ型: polyshape

拡張機能

バージョン履歴

R2017b で導入