Square root
(Quaternion overloading of standard MATLAB® function)
Y = sqrt(X)
sqrt(X) computes the square root of each element of the quaternion array X.
The quaternion square root is easily defined in terms of the polar form: q = |q|exp(μθ). Then √q = √|q|exp(μθ/2).
>> sqrt(qi) ans = 0.7071 + 0.7071 * I + 0 * J + 0 * K >> ans.^2 ans = 0 + 1 * I + 0 * J + 0 * K