Quaternion Function Reference

sym

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

Syntax

Y = sym(X)

Description

sym(X) constructs a quaternion or octonion with symbolic components from the quaternion X. It is an overloading of the MATLAB® function of the same name implemented by a common mechanism for quaternion functions that can be computed by separate application of the MATLAB® function to each component of the quaternion array. Examples of application are given below.

Examples

>> p = sym(qi)
 
p = 1 * I + 0 * J + 0 * K
 
>> class(p)

ans = 'quaternion'

>> class(p.x)

ans = 'sym'
>> sym(randq)
 
ans = (4209920399838119/4503599627370496) +
      (-6095902275197935/36028797018963968) * I +
      (-3266816872732743/36028797018963968) * J +
      (-5383832095605575/18014398509481984) * K
 
>> normq(ans)
 
ans = 649037107316853512198686983106539/649037107316853453566312041152512
 
>> eval(ans)

ans = 1

See Also

MATLAB® function: sym

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

License terms.