scale
polyshape
のスケーリング
説明
例
多角形のスケーリング
多角形を作成し、係数 2 を使用してスケーリングします。
polyin = polyshape([0 0 1 1],[1 0 0 1]); poly1 = scale(polyin,2);
点 (1,1) を基準に、係数 0.5 を使用して polyin
をスケーリングします。3 つの多角形をすべてプロットします。
poly2 = scale(polyin,0.5,[1 1]);
plot(polyin)
hold on
plot(poly1)
plot(poly2)
入力引数
polyin
— 入力 polyshape
スカラー | ベクトル | 行列 | 多次元配列
入力 polyshape
。スカラー、ベクトル、行列または多次元配列として指定します。
データ型: polyshape
s
— スケール係数
スカラー | 2 要素の行ベクトル
スケール係数。スカラーまたは 2 要素の行ベクトルとして指定します。s
の要素は正でなければなりません。
s
がスカラーの場合、scale
はこれを x 方向と y 方向の両方に適用します。s
が 2 要素の行ベクトルの場合、1 番目の要素は x 方向のスケール係数で、2 番目の要素は y 方向のスケール係数です。
入力 polyshape
が配列の場合、scale
は s
をこの配列の各要素に適用します。
データ型: double
| single
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
refpoint
— 基準点
[0 0]
| 2 要素の行ベクトル
基準点。スケーリングの基準となる点の x 座標と y 座標を含む 2 要素の行ベクトルとして指定します。入力 polyshape
が配列の場合、この配列の各要素が refpoint
を基準にスケーリングされます。
データ型: double
| single
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
バージョン履歴
R2017b で導入
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)