Question: 3. Consider the MATLAB function GaussPivot() given in class in slide 5-31. (a) Modify GaussPivot() so that it computes and returns the determinant (with the
function x Gausts Pivot (A,b) t GaussPivot: Gauss elimination pivoting tx Gausspivot lA.b) Gauss elinination with pivoting. t input: Acoefficient matrix b right hand side vector s output: tx solution vector Im, nl-size(A): if m-n, error ('Matrix A must be square'): end nb-n+1 Aug" [A b); t forvard elimination for k- 1:n-1 oue partial pivo ting big, il-max (abs (Aug (k:n,x)) ipr-irk-1, end tor i -k+lin factor Aug (i,k)/Aug (k,k)i end end 3 back substitution xszeros (n. 1)a x(n) Aug (n,nb)/Aug (n,n) i for i n-1:-1:1 end eterminant Evaluation lon matrix can be simply
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
