QuatMult.m 260 B

12345
  1. function quatOut = QuatMult(quatA,quatB)
  2. % Calculate the following quaternion product quatA * quatB using the
  3. % standard identity
  4. quatOut = [quatA(1)*quatB(1)-quatA(2:4)'*quatB(2:4); quatA(1)*quatB(2:4) + quatB(1)*quatA(2:4) + cross(quatA(2:4),quatB(2:4))];