Main Content

quatinv

Calculate inverse of quaternion

Description

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

Aerospace Toolbox uses quaternions that are defined using the scalar-first convention. For more information on quaternion forms, see Algorithms.

Examples

collapse all

Calculate the inverse of a quaternion q.

qinv = quatinv([1 0 1 0])
qinv = 1×4

    0.5000         0   -0.5000         0

Input Arguments

collapse all

Quaternion, specified as an m-by-4 matrix containing m quaternions.

Data Types: double

Output Arguments

collapse all

Inverse of quaternion, returned as an m-by-4 matrix.

Algorithms

The quaternion has the form of

q=q0+iq1+jq2+kq3.

The quaternion inverse has the form of

q1=q0iq1jq2kq3q02+q12+q22+q32.

References

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

Extended Capabilities

Version History

Introduced in R2006b