1function q = conjugate(q)
2%CONJUGATE Calculate the conjugate of a quaternion
3% A single quaternion is represented as a 1 x 4 vector with the first
4% component being the real part and the 2nd to 4th components
5% corresponding to the complex vector part.Collections of N quaternions
6% can be stored as N x 4 matrices.
8q(:,2:4) = -q(:,2:4);
9end