Main Content

quatnorm

Calculate norm of quaternion

Description

example

norm= quatnorm(q)calculates the normnormfor a given quaternion,q. For more information on the quaternion and quaternion norm forms, seeAlgorithms.

Aerospace Toolboxuses quaternions that are defined using the scalar-first convention.

Examples

collapse all

Determine the norm ofq = [.5 -.5 .5 0].

norm=quatnorm([.5 -.5 .5 0])
norm = 0.7500

Input Arguments

collapse all

Quaternion matrix, specified in anm-by-4 matrix of real numbers containingmquaternions.

Example:[1 0 0 0]

Data Types:double

Output Arguments

collapse all

Norms, returned as a column vector ofmnorms.

Algorithms

The quaternion has the form of

q = q 0 + i q 1 + j q 2 + k q 3 .

The quaternion norm has the form of

n o r m ( q ) = q 0 2 + q 1 2 + q 2 2 + q 3 2 .

References

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

Extended Capabilities

版本历史

Introduced in R2006b