You are on page 1of 3

Green = code Black = instructions

Define A and B type the following in matlab

A = *0.2, -0.1, -0.1, 0.2; -0.4, 0.5, 0.4, -0.5; 0.8, -0.6, 0.8, -0.6; 0.1, -0.4, -0.4, 0.1+ B = *0.7 -0.4 0.3 0.1; -0.8 0.6 -0.4 0.2; 0.2 -1.4 -0.5 0.5; 0.3 0.1 0.1 0.4+

a) show that ABtranposed does not equal BtransposedA ABtranposed type A*B' Copy result into word, this is your first answer Second part is BtransposedA type B'*A

copy this result as well... the two results are clearly different, this is your answer b) find solution to Ax=c and Bx=c he wants you to find "x" as c is given A and B are already defined type c = *0.1 0.2 0.5 0.4+' now the system knows c as well i found the follows on the internet AX = C A1AX = A1C IX = A1C X = A1C

So basically to find x you need to type the following in matlab

x = (A^-1)*c press enter then type x' press enter

this is your answer for x1 x2 x3 and x4 (you need four answers in total) i got x = *3.4643 2.5357 -3.5357 -3.4643+ after this, feed in the second set of c values type clear c clear x c = *0.1 0.5 0.5 0.4+' x = (A^-1)*c x' this is your second answer for x1 x2 x3 and x4

now do Bx=c type clear c clear x c = *0.1 0.2 0.5 0.4+' x = (B^-1)*c x'

third set of answers for x1 x2 x3 abd x4

type clear x clear c c = *0.1 0.5 0.5 0.4+' x = (B^-1)*c x'

fourth set of answers for x1 x2 x3 and x4

You might also like