Calculate norm of quaternion
n = quatnorm(q)
n = quatnorm(q) calculates the norm,
n, for a given quaternion,
q is an
m-by-4 matrix containing
n returns a column vector of
m norms. Each element of
q must be a real
Aerospace Toolbox uses quaternions that are defined using the scalar-first convention.
The quaternion has the form of
The quaternion norm has the form of
Determine the norm of
q = [1 0 0 0]:
norm=quatnorm([.5 -.5 .5 0]) norm = 0.7500
 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.