Axis of quaternion.
Y = axis(X)
If Q = a + μ .* b where a and b are real/complex, and μ is a unit pure quaternion, then axis(Q) = μ.
The polar form of a quaternion is q = A exp(μθ) where A is a real or complex modulus, μ is a unit pure quaternion, and θ is an angle. It is μ that is computed by this function.
>> axis(qi + qj + qk) ans = 0.5774 * I + 0.5774 * J + 0.5774 * K >> axis(1 + qi + qj + qk) ans = 0.5774 * I + 0.5774 * J + 0.5774 * K