translate
polyshape
の平行移動
説明
例
正方形の平行移動
正方形を作成し、その正方形を右に 2 単位、上に 1 単位平行移動させます。両方の正方形をプロットします。
polyin = polyshape([0 0 1 1],[1 0 0 1]);
polyout = translate(polyin,[2 1]);
plot([polyin polyout])
axis equal
入力引数
polyin
— 入力 polyshape
スカラー | ベクトル | 行列 | 多次元配列
入力 polyshape
。スカラー、ベクトル、行列または多次元配列として指定します。
データ型: polyshape
v
— 平行移動距離
2 要素の行ベクトル
平行移動距離。2 要素の行ベクトルとして指定します。v
の 1 番目の要素は x 方向に平行移動する距離で、2 番目の要素は y 方向に平行移動する距離です。正の距離は右および上への平行移動、負の移動距離は左および下への平行移動を表します。入力 polyshape
が配列の場合、この配列の各要素が v
に従って平行移動されます。
データ型: double
| single
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
x
— x 方向の平行移動距離
スカラー
x 方向の平行移動距離。スカラーとして指定します。正の距離は右への平行移動、負の移動距離は左への平行移動を表します。入力 polyshape
が配列の場合、この配列の各要素が x
に従って x 方向に平行移動されます。
データ型: double
| single
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
y
— y 方向の平行移動距離
スカラー
y 方向の平行移動距離。スカラーとして指定します。正の距離は上への平行移動、負の移動距離は下への平行移動を表します。入力 polyshape
が配列の場合、この配列の各要素が y
に従って y 方向に平行移動されます。
データ型: double
| single
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
拡張機能
C/C++ コード生成
MATLAB® Coder™ を使用して C および C++ コードを生成します。
使用上の注意事項および制限事項:
コード生成用に動的メモリ割り当てを有効にしなければなりません。
名前と値のペアはコンパイル時の定数でなければなりません。
バージョン履歴
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)