Main Content

quatinv

Calculate inverse of quaternion

Description

n= quatinv(q)calculates the inverse,n, for a given quaternion,q.

Aerospace Toolboxuses quaternions that are defined using the scalar-first convention. For more information on quaternion forms, seeAlgorithms.

Examples

collapse all

Determine the inverse ofq = [1 0 1 0]:

qinv = quatinv([1 0 1 0])
qinv = 0.5000 0 -0.5000 0

Input Arguments

collapse all

Quaternion, specified as anm-by-4 matrix containingmquaternions.

Data Types:double

Output Arguments

collapse all

Inverse of quaternion, returned as anm-by-4 matrix.

Algorithms

The quaternion has the form of

q = q 0 + i q 1 + j q 2 + k q 3 .

The quaternion inverse has the form of

q 1 = q 0 i q 1 j q 2 k q 3 q 0 2 + q 1 2 + q 2 2 + q 3 2 .

References

[1] Stevens, Brian L., Frank L. Lewis,Aircraft Control and Simulation, Wiley–Interscience, 2nd Edition.

Extended Capabilities

Introduced in R2006b