Hi everyone. I am doing matlab as a module for my first year at Uni. I am stuck on the following tutorial question.
A quaternion Q is a number with the following form
Q = a + bI + cJ + dK where
I 2 = J 2 = K2 = -1, IJ = K, JK = I , KI = J , JI = -K, KJ = -I , IK = -J
It can be proved that a quaternion can be represented by the complex matrix, i.e.
Q= a bI cJ dK =[a + bi c+di]
[-c + di a-bi]
where i = squareroot(-1).
The MATLAB function you develop should have two quaternions as arguments
and should multiply them together. The quaternions should be given in the form
v = [a1 b1 c1 d1] and v = [a2 b2 c2 d2] . Your function should take the
two quaternions expressed as vectors and express each of them as complex
matrix. Then it multiplies the two matrices together and output the product as a
vector of the form v = [a b c d ] . To test the function determine the product
Q1 = 3+ 4I - 2J + 5K and Q2 = 7 + 2I - 3K
Using these two quaternions, show that the multiplication is not commutative,
i.e Q1Q2 is not equal to Q2Q1 . Note that although you have only shown this for two specificquaternions, it is generally true.
Please reply back asap. Many thanks
... and the ones that won't