Main Content

Quaternion Modulus

Calculate modulus of quaternion

  • Library:
  • Aerospace Blockset / Utilities / Math Operations

  • Quaternion Modulus block


The Quaternion Modulus block calculates the magnitude for a given quaternion. Aerospace Blockset™ uses quaternions that are defined using the scalar-first convention. For the equations used for the quaternion and quaternion modulus, see Algorithms.



expand all

Quaternions in the form of [ q 0 , r 0 , ..., q 1 , r 1 , ... , q 2 , r 2 , ... , q 3 , r 3 , ...], specified as a quaternion or vector of quaternions.

Data Types: double


expand all

Quaternion modulus or vector of quaternion moduli in the form of [| q |, | r |, ...].

Data Types: double


The quaternion has the form of


The quaternion modulus has the form of



[1] Stevens, Brian L., Frank L. Lewis. Aircraft Control and Simulation, Second Edition. Hoboken, NJ: Wiley–Interscience.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Introduced before R2006a