Question: Question about Matlab Programmin: We used the Gaus_El function to solve linear system of equations in the upper triangular form (the algorithm is called forward
Question about Matlab Programmin:
We used the Gaus_El function to solve linear system of equations in the upper triangular form (the algorithm is called forward substitution): 1 function c = gaus_El (a, b, n) 2 x(n) = b (n)/a (n, n) 3 for p = (n - 1): -1:1 4 x (p) = b (p) 5 for k = (p + 1):n 6 x(p) = x (p) - a (p, k) *x (k) 7 end x (p) = x (p)/a (p, p) 9 end a) Do the following example by hand (show the steps clearly) -2x_1 + x_2 + 2x_3 = 9 3x_2 - 2x_3 = -1 4x_3 = 8 b) Which part of your calculations relates to line 2? c) Which part of your calculations relates to line 8? d) Which part of your calculations relates to lines 5, 6, 7? We used the Gaus_El function to solve linear system of equations in the upper triangular form (the algorithm is called forward substitution): 1 function c = gaus_El (a, b, n) 2 x(n) = b (n)/a (n, n) 3 for p = (n - 1): -1:1 4 x (p) = b (p) 5 for k = (p + 1):n 6 x(p) = x (p) - a (p, k) *x (k) 7 end x (p) = x (p)/a (p, p) 9 end a) Do the following example by hand (show the steps clearly) -2x_1 + x_2 + 2x_3 = 9 3x_2 - 2x_3 = -1 4x_3 = 8 b) Which part of your calculations relates to line 2? c) Which part of your calculations relates to line 8? d) Which part of your calculations relates to lines 5, 6, 7
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
