regions
polyshape
の領域にアクセス
説明
例
多角形領域の配列
2 つの固体領域がある多角形を計算します。次に、各要素が多角形の各領域であるベクトルを作成します。
P = [0 0; 0 2; 2 2; 2 0; NaN NaN; 0.5 0.5; 0.5 1.5; 1.5 1.5; 1.5 0.5; NaN NaN; 3 0.5; 3.5 1.5; 4 0.5; NaN NaN; 3.25 0.6; 3.75 0.6; 3.5 1]; polyin = polyshape(P); plot(polyin) xlim([-0.5 4.5]) ylim([-0.5 2.5])
polyout = regions(polyin)
polyout = 2x1 polyshape array with properties: Vertices NumRegions NumHoles
plot(polyout(1)) xlim([-0.5 4.5]) ylim([-0.5 2.5])
plot(polyout(2)) xlim([-0.5 4.5]) ylim([-0.5 2.5])
入力引数
polyin
— 入力 polyshape
スカラー
入力 polyshape
。スカラーとして指定します。
データ型: polyshape
バージョン履歴
R2017b で導入
参考
boundary
| sortregions
| polyshape
| holes
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
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
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)