Main Content

quatlog

自然logarithm of quaternion

Syntax

Description

example

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

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

This function uses the relationships.

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

Examples

collapse all

Calculate the natural logarithm of quaternion matrixq=[1.0 0 1.0 0].

qlog = quatlog(quatnormalize([1.0 0 1.0 0]))
qlog = 0 0 0.7854 0

Input Arguments

collapse all

Quaternions for which to calculate the natural logarithm, specified as anM4矩阵containingMquaternions. This quaternion must be a normalized quaternion.

Data Types:double

Output Arguments

collapse all

自然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