メインコンテンツ

方向、位置、および座標系

四元数、オイラー角、回転行列、および変換

quaternion データ型を使用して方向と回転を表します。eulerrotmat、および rotvec の各関数を使用して、四元数とオイラー角、回転行列、回転ベクトルの間で変換します。

四元数の数学的な説明と、Sensor Fusion and Tracking Toolbox™ での実装方法の詳細については、Rotations, Orientation, and Quaternionsを参照してください。Sensor Fusion and Tracking Toolbox の規則と座標系の詳細については、方向、位置、および座標の規則を参照してください。

関数

すべて展開する

quaternionquaternion 配列の作成
ones実数部が 1 に設定され、虚数部が 0 に設定された quaternion 配列を作成
zerosすべての部分が 0 に設定された quaternion 配列を作成
classUnderlyingquaternion の各部分のクラス
normalize四元数正規化
randrot一様分布のランダムな回転
times, .*要素単位の四元数の乗算
mtimes, *四元数の乗算
prodquaternion 配列の積
minus, -四元数の減算
uminus, -四元数の単項マイナス
conj四元数の複素共役
ldivide, .\要素単位の四元数の左除算
rdivide, ./要素単位の四元数の右除算
mldivide, \スカラーの四元数の左除算 (R2024a 以降)
mrdivide, /スカラーの四元数の右除算 (R2024a 以降)
expquaternion 配列の指数
logquaternion 配列の自然対数
power, .^要素単位の四元数のべき乗
dist角距離 (ラジアン)
norm四元数のノルム
angvelquaternion 配列による角速度
meanrot四元数の平均回転
slerp球面線形内挿
interp1四元数の内挿 (テーブル ルックアップ) (R2025a 以降)
rotateframe四元数の座標系の回転
rotatepoint四元数の点の回転
so2SO(2) 回転 (R2023b 以降)
so3SO(3) 回転 (R2023b 以降)
ctranspose, 'quaternion 配列の複素共役転置
transpose, .'quaternion 配列の転置
rotmat四元数の回転行列への変換
rotvec四元数の回転ベクトルへの変換 (ラジアン単位)
rotvecd四元数の回転ベクトルへの変換 (度単位)
parts四元数の各部分の抽出
euler四元数をオイラー角 (ラジアン) に変換
eulerd四元数をオイラー角 (度) に変換
compactquaternion 配列を N 行 4 列の行列に変換
transformMotionCompute motion quantities between two relatively fixed frames
se2SE(2) 同次変換 (R2023b 以降)
se3SE(3) 同次変換 (R2023b 以降)
enu2llaローカルの東-北-上座標を測地座標に変換
ned2llaローカルの北-東-下座標を測地座標に変換
lla2ned測地座標をローカルの北-東-下座標に変換
lla2enu測地座標をローカルの東-北-上座標に変換

トピック

  • 方向、位置、および座標の規則

    空間表現と座標系に関するツールボックスの規則について説明する。

  • Rotations, Orientation, and Quaternions

    This example reviews concepts in three-dimensional rotations and how quaternions are used to describe orientation and rotations. Quaternions are a skew field of hypercomplex numbers. They have found applications in aerospace, computer graphics, and virtual reality. In MATLAB®, quaternion mathematics can be represented by manipulating the quaternion class.

  • Lowpass Filter Orientation Using Quaternion SLERP

    This example shows how to use spherical linear interpolation (SLERP) to create sequences of quaternions and lowpass filter noisy trajectories. SLERP is a commonly used computer graphics technique for creating animations of a rotating object.