Simplify symbolic quaternion or octonion
(Quaternion and octonion overloadings of standard MATLAB® function)
S = simplify(expr, varargin)
This function requires the MATLAB® Symbolic Math Toolbox.
simplify applies algebraic simplification to each component of the quaternion or octonion expr. It accepts the same parameter profiles as the overloaded MATLAB® function.
simplify will return a pure quaternion or octonion expression when it can prove that the scalar part is identically zero, or a scalar expression (not a quaternion or octonion) when it can prove that the vector part is identically zero.
>> mu = unit(quaternion('x', 'y', 'z')) mu = (x/(x^2 + y^2 + z^2)^(1/2)) * I + (y/(x^2 + y^2 + z^2)^(1/2)) * J + (z/(x^2 + y^2 + z^2)^(1/2)) * K >> mu^2 ans = - x^2/(x^2 + y^2 + z^2) - y^2/(x^2 + y^2 + z^2) - z^2/(x^2 + y^2 + z^2) >> simplify(ans) ans = -1