9.22 Develop, debug, and test a program in either a high-level language or a macro language of your choice to solve a system of equations with Gauss-Jordan elimination without partial pivoting. Base the program on the pseudocode from Fig. 9.10. Test the program using the same system as in Prob. 9.18. Compute the total number of flops in your algorithm to verify Eq. 9.37. FIGURE 9.10 Pseudocode to implement the Gauss-Jordan algorithm with- out partial pivoting. SUB GaussJordan(aug, m, n, x) DOFOR k = 1, m d = aug(k, k) DOFOR j = 1, n aug(k, j) = aug(k, j)/d END DO DOFOR 1 = 1, m IF 1 % K THEN d = aug(i, k) DOFOR j = k, n aug(1, j) END DO aug(1, j) - d*aug(k, j) END IF END DO END DO DOFOR k = 1, m x(k) = aug(k, n) END DO END GaussJordan

Linear Algebra: A Modern Introduction
4th Edition
ISBN:9781285463247
Author:David Poole
Publisher:David Poole
Chapter2: Systems Of Linear Equations
Section2.2: Direct Methods For Solving Linear Systems
Problem 2CEXP
icon
Related questions
Question
9.22 Develop, debug, and test a program in either a high-level language or a macro
language of your choice to solve a system of equations with Gauss-Jordan elimination
without partial pivoting. Base the program on the pseudocode from Fig. 9.10. Test the
program using the same system as in Prob. 9.18. Compute the total number of flops in
your algorithm to verify Eq. 9.37.
FIGURE 9.10
Pseudocode to implement the
Gauss-Jordan algorithm with-
out partial pivoting.
SUB GaussJordan(aug, m, n, x)
DOFOR k = 1, m
d = aug(k, k)
DOFOR j = 1, n
aug(k, j) = aug(k, j)/d
END DO
DOFOR 1 = 1, m
IF 1 % K THEN
d = aug(i, k)
DOFOR j = k, n
aug(1, j)
END DO
aug(1, j) - d*aug(k, j)
END IF
END DO
END DO
DOFOR k = 1, m
x(k) = aug(k, n)
END DO
END GaussJordan
Transcribed Image Text:9.22 Develop, debug, and test a program in either a high-level language or a macro language of your choice to solve a system of equations with Gauss-Jordan elimination without partial pivoting. Base the program on the pseudocode from Fig. 9.10. Test the program using the same system as in Prob. 9.18. Compute the total number of flops in your algorithm to verify Eq. 9.37. FIGURE 9.10 Pseudocode to implement the Gauss-Jordan algorithm with- out partial pivoting. SUB GaussJordan(aug, m, n, x) DOFOR k = 1, m d = aug(k, k) DOFOR j = 1, n aug(k, j) = aug(k, j)/d END DO DOFOR 1 = 1, m IF 1 % K THEN d = aug(i, k) DOFOR j = k, n aug(1, j) END DO aug(1, j) - d*aug(k, j) END IF END DO END DO DOFOR k = 1, m x(k) = aug(k, n) END DO END GaussJordan
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Linear Algebra: A Modern Introduction
Linear Algebra: A Modern Introduction
Algebra
ISBN:
9781285463247
Author:
David Poole
Publisher:
Cengage Learning
Elements Of Modern Algebra
Elements Of Modern Algebra
Algebra
ISBN:
9781285463230
Author:
Gilbert, Linda, Jimmie
Publisher:
Cengage Learning,