Main Content

quatpower

Power of quaternion

Description

qp = quatpower(q,pow) calculates q to the power of pow for a normalized quaternion, q.

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

example

Examples

collapse all

This example shows how to calculate the power of 2 of quaternion q = [1.0 0 1.0 0].

qp = quatpower(quatnormalize([1.0 0 1.0 0]),2)
qp = 1×4

   -0.0000         0    1.0000         0

Input Arguments

collapse all

Quaternions for which to calculate exponentials, specified as an M-by-4 matrix containing M quaternions.

Data Types: double

Power to which to calculate quaternion power, specified as an M-by-1 vector containing M power scalars.

Data Types: double

Output Arguments

collapse all

Power of quaternion.

References

[1] Dam, Erik B., Martin Koch, Martin Lillholm. "Quaternions, Interpolation, and Animation." University of Copenhagen, København, Denmark, 1998.

Version History

Introduced in R2016a