Quaternion Function Reference

simplify

Simplify symbolic quaternion or octonion
(Quaternion and octonion overloadings of standard MATLAB® function)

Syntax

S = simplify(expr, varargin)

Description

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.

Examples

>> 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

See Also

MATLAB® function: simplify
QTFM functions: assume, assumeAlso, assumptions, collect, combine, expand, rewrite

© 2008-2022 Stephen J. Sangwine and Nicolas Le Bihan

License terms.