Solve using MATHCAD or EXCEL Given the following set of simu

Solve using MATHCAD or EXCEL

Given the following set of simultaneous linear equations: x_1 + X_2 + 8 middot X_3 = 54 x_1 + 7 middot x_2 + 3 middot x_3 = 116 x_1 + 4 middot X_2 + 9 middot x_3 = 80 Solve for the x\'s using matrix operations. The following equation may be helpful: [A] * {x} = {b} Remember that square brackets usually represent a matrix while curly brackets are used for vectors. Don\'t forget to solve each problem using Mathcad AND Excel!!!

Solution

MATLAB CODE::

clc
clear all
a=[4 1 8; 2 7 3 ; 1 4 9]
f=[54;116;80]
e=[a f]
e1=[e(1,1) e(1,2) e(1,3) f(1,1)];
e2=[e(2,1) e(2,2) e(2,3) f(2,1)];
e3=[e(3,1) e(3,2) e(3,3) f(3,1)];
b=[e1*(1/e(1,1)); e2-e(2,1)*(e1*(1/e(1,1)));e3-e(3,1)*(e1*(1/e(1,1)))]
b1=[b(1,1) b(1,2) b(1,3) b(1,4)];
b2=[b(2,1) b(2,2) b(2,3) b(2,4)];
b3=[b(3,1) b(3,2) b(3,3) b(3,4)];
c=[b1-b(1,2)*(b2*(1/b(2,2)));b2*(1/b(2,2));b3-b(3,2)*(b2*(1/b(2,2)))]
c1=[c(1,1) c(1,2) c(1,3) c(1,4)];
c2=[c(2,1) c(2,2) c(2,3) c(2,4)];
c3=[c(3,1) c(3,2) c(3,3) c(3,4)];
d=[c1-c(1,3)*(c3*(1/c(3,3)));c2-c(2,3)*(c3*(1/c(3,3)));(c3*(1/c(3,3)))]
d1=[d(1,1) d(1,2) d(1,3) d(1,4)];
d2=[d(2,1) d(2,2) d(2,3) d(2,4)];
d3=[d(3,1) d(3,2) d(3,3) d(3,4)];
x1=d(1,4)
x2=d(2,4)
x3=d(3,4)

MATLAB OUTPUT::

a =

     4     1     8
     2     7     3
     1     4     9


f =

    54
   116
    80


e =

     4     1     8    54
     2     7     3   116
     1     4     9    80


b =

    1.0000    0.2500    2.0000   13.5000
         0    6.5000   -1.0000   89.0000
         0    3.7500    7.0000   66.5000


c =

    1.0000         0    2.0385   10.0769
         0    1.0000   -0.1538   13.6923
         0         0    7.5769   15.1538


d =

    1.0000         0         0    6.0000
         0    1.0000         0   14.0000
         0         0    1.0000    2.0000


x1 =

    6.0000


x2 =

   14.0000


x3 =

    2.0000

Solve using MATHCAD or EXCEL Given the following set of simultaneous linear equations: x_1 + X_2 + 8 middot X_3 = 54 x_1 + 7 middot x_2 + 3 middot x_3 = 116 x_1
Solve using MATHCAD or EXCEL Given the following set of simultaneous linear equations: x_1 + X_2 + 8 middot X_3 = 54 x_1 + 7 middot x_2 + 3 middot x_3 = 116 x_1

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site