Quaternion Function Reference

real

Real part of a complex quaternion
(Quaternion and octonion overloadings of standard MATLAB® function)

Syntax

Y = real(X)

Description

real(X) returns the real part of a complex quaternion.

The concept of the real part of a quaternion should not be confused with the scalar part (returned by the function scalar or s).

Examples

>>  q =  complex(quaternion(1,2,3,4), quaternion(5,6,7,8))
 
q = (1+5i) + (2+6i) * I + (3+7i) * J + (4+8i) * K
 
>> imag(q)
 
ans = 5 + 6 * I + 7 * J + 8 * K
 
>> real(q)
 
ans = 1 + 2 * I + 3 * J + 4 * K

See Also

QTFM function: imag
MATLAB® function: real

References

  1. Ward, J. P., "Quaternions and Cayley numbers", Kluwer, 1997.

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

License terms.