Calculate modulus of quaternion
n = quatmod(q)
n = quatmod(q) calculates
n, for a given quaternion,
q is an
a column vector of
m moduli. Each element of
be a real number. Additionally,
q has its scalar
number as the first column.
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
 Stevens, Brian L., Frank L. Lewis, Aircraft Control and Simulation, Wiley–Interscience, 2nd Edition.
Usage notes and limitations:
Code generation for this function requires the Aerospace Blockset™ software.