Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem on “Gauss Elimination\" A set of linear equations are given below. 4u +

ID: 3606996 • Letter: P

Question

Problem on “Gauss Elimination" A set of linear equations are given below. 4u + 4u + 2w = 6, Write a matrix in the form A X - B where X - [u v w] In Gaussian elimination method an augmented matrix Aa = [A B] is reduced into upper triangular matrix using a series of row operations. Here X and B are column vectors. Write a MATLAB seript and solvefor the unkcnow varables and w using Caussian elimination and "back-substitution" method. In the class yesterday, you learned about (Ei, E2, Es) elementary row operation matrices that will perform scaling operation, interchange of rows, and a combination operation called replacement operation. Develop appropriate row operation matrices to implement Gaussian elimination method with MATLAB. Note you may combine two elementary operation matrices Esa and Esb into a single row operation matrix M = E' E3b. An algorithm for implementing "back-substitution" method is given below: Algorithm Back-Substitution for Upper Triangular System ( loop backwards over columns f stop if matrix is singular ) ( compute solution component h for J n to 1 if tw = 0 then stop for t = 1 to J-1 ( update right-hand side ) bi = bi-uijXj end end

Explanation / Answer

function upTrig = BackSubUpTrg(a,b) % This function create to solve AX=B where A is the Matrix and B is the constant vector elements and X=[u v w]
n = length(b); % to find the lenght of B vector elements
upTrig(n,1) = b(n)/a(n,n); % to find the Pivot element i.e., 2.5000
for i = n-1:-1:1 % loop begins from 2 to 1 elements
upTrig(i,1)=(b(i)-a(1,i+1:n)*upTrig(i+1:n,1))./a(i,i); % to get the second element and first element of vectors

end

Output:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote