Natural logarithm of quaternion



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

This function uses the relationships.

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


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.

Introduced in R2016a