Solve the following system of six linear equations on MatLAB:
2a-4b+5c-3.5d +1.8 e + 4 f= 52.52
-1.5 a + 3b +4c-d-2e +5f= -21.1
5a+b-6c+3d -2e +2 f = -27.6
1.2a 2b +3c+4d-e+4f=9.16
4a+b-2c-3d-4e+1.5 f= - 17.9
3a+b-c+4d-2e-4 f= -16.2
A = [2 -4 5 -3.5 1.8 4
-1.5 3 4 -1 -2 5
5 1 -6 3 -2 2
1.2 2 3 4 -1 4
4 1 -2 -3 -4 1.5
3 1 -1 4 -2 -4];
b = [52.52; -21.1; -27.6; 9.16; -17.9; -16.2];
x = A\b
Results:
x =
-201.6990
-348.1180
-31.3556
117.8174
-334.8739
58.8395
Comments
Leave a comment