GAUSS-JORDAN - HOMEWORK 3 Code a Matlab m file that will solve the following linear equation systems using Gauss-Jordan elimination method(10 p 4x 8y 4z

GAUSS-JORDAN - HOMEWORK 3 Code a Matlab m file that will...

This preview shows page 1 out of 1 page.

HOMEWORK 3 : Code a Matlab m file that will solve the following linear equation systems using Gauss-Jordan elimination method. (10 p) 4x + 8y + 4z = 80 2x + y – 4z = 7 3x - y + 2z = 22 Algorithm GAUSS-JORDAN ELIMINATION WITH ROW PIVOTING Input M Matrix of coefficients (n-by-n) B right-hand side(s) of equations, A x = B (n-by-n) n, m dimensions of input matrices Initialize A = [M B] form augmented matrix Forward Elimination for k=1 to n-1 pivot=|A(k,k)| pivot element p=k pivot row For i=k+1 to n

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture