Quaternion operations in MATLAB