Real part of a complex quaternion
(Quaternion and octonion overloadings of standard MATLAB® function)
Y = real(X)
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).
>> 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