# quatlog

Natural logarithm of quaternion

## Description

example

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=\left[\mathrm{cos}\left(\theta \right),\mathrm{sin}\left(\theta \right)v\right],$ with $\mathrm{log}\left(q\right)=\left[0,\theta v\right].$

## Examples

collapse all

Calculate the natural logarithm of quaternion matrix q=[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 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