n = quatnormalize(q)
n = quatnormalize(q) calculates the normalized
n, for a given quaternion,
q is an
m-by-4 matrix containing
n returns an
m-by-4 matrix of normalized quaternions. 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 normalized quaternion has the form of
q = [1 0 1 0]:
normal = quatnormalize([1 0 1 0]) normal = 0.7071 0 0.7071 0
 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.