Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Solve system of equations using gauss elimination with pivoting. Can't figure out how to turn this psuedocode into a working matlab system to solve the
Solve system of equations using gauss elimination with pivoting. Can't figure out how to turn this psuedocode into a working matlab system to solve the question.
268 GAUSS ELIMINATION ) SUS Gauss (a, b, 0, x, tol, er) DIMENSION sn) er = 0 DOFOR 1 = 1, n Si = ABS(1,1) DOFOR j = 2, IF ABSC ) >S, THEN S; = ABS( END DO END DO CALL Eliminatea, s. n. b, tol, er) IF er -1 THEN CALL Substituteia, n, o, x) END IF END Gauss SUB Pivot (a, b, 5, n. k) p=k big = ABS(x,x/Sk) DOFOR 11 = k + 1, 2 dummy = ABS(://S) IF dummy > big THEN big = dummy o= i END IF END DO IF P * K THEN DOFOR jj = kn dumny = d. ap.w = k.ja ak = dum END 00 dumny = b bp = Dk x = durany dumny = Sp So = Sx 5x = dummy END IF END pivot SUB Eliminate (a, S, a, b, tol, er) DOFOR K = 1, 1 - 1 CALL Pivot (a, b, s, , ) IF ABS (aws)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started