quat
説明
例
SE(3) 変換の四元数への変換
並進をゼロにし、四元数で定義された回転を使用して SE(3) 変換を作成します。関数 eul2quat
を使用して四元数を作成します。
quat1 = eul2quat([0 0 deg2rad(30)])
quat1 = 1×4
0.9659 0.2588 0 0
T = se3(quat1,"quat")
T = se3
1.0000 0 0 0
0 0.8660 -0.5000 0
0 0.5000 0.8660 0
0 0 0 1.0000
変換を四元数に戻します。
quat2 = quat(T)
quat2 = 1×4
0.9659 0.2588 0 0
SO(3) 回転の四元数への変換
四元数で定義された SO(3) 回転を作成します。関数 eul2quat
を使用して四元数を作成します。
quat1 = eul2quat([0 0 deg2rad(30)])
quat1 = 1×4
0.9659 0.2588 0 0
R = so3(quat1,"quat")
R = so3
1.0000 0 0
0 0.8660 -0.5000
0 0.5000 0.8660
回転を四元数に変換します。
quat2 = quat(R)
quat2 = 1×4
0.9659 0.2588 0 0
入力引数
出力引数
q
— 四元数回転角度
M 行 4 列の行列
四元数回転角度。M 行 4 列の行列として返されます。各行の形式は [qw qx qy qz] です。M は、指定された変換または回転の総数です。
バージョン履歴
R2023a で導入
参考
se3
| so3
| quaternion
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)