Main Content

quatlog

Natural logarithm of quaternion

Description

ql=quatlog(q) calculates the natural logarithm, ql, for a normalized quaternion, q.

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

This function uses the relationships.

For q=[cos(θ),sin(θ)v], with log(q)=[0,θv].

example

Examples

collapse all

This example shows how to calculate the natural logarithm of quaternion matrix q=[1.0 0 1.0 0].

qlog = quatlog(quatnormalize([1.0 0 1.0 0]))
qlog = 1×4

         0         0    0.7854         0

Input Arguments

collapse all

Quaternions for which to calculate the natural logarithm, specified as an M-by-4 matrix containing M quaternions. This quaternion must be a normalized quaternion.

Data Types: double

Output Arguments

collapse all

Natural logarithm 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