Calculate modulus of quaternion
n = quatmod(q)
n = quatmod(q)
calculates the modulus,
n
, for a given quaternion, q
. Input
q
is an m
-by-4 matrix containing
m
quaternions. n
returns a column vector
of m
moduli. Each element of q
must be a real
number.
Aerospace Toolbox uses quaternions that are defined using the scalar-first convention.
The quaternion has the form of
The quaternion modulus has the form of
Determine the modulus of q = [1 0 0 0]
:
mod = quatmod([1 0 0 0]) mod = 1
[1] Stevens, Brian L., Frank L. Lewis, Aircraft Control and Simulation, Wiley–Interscience, 2nd Edition.
quatconj
| quatdivide
| quatinv
| quatmultiply
| quatnorm
| quatnormalize
| quatrotate