Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Modify the Gauss-Seidel function you completed in Lab 6, such that the function checks if the diagonal entries are zero. If needed, the function will
-
Modify the Gauss-Seidel function you completed in Lab 6, such that the function checks if the diagonal entries are zero. If needed, the function will swap the row that has a zero diagonal element with the next suitable row in A such that a matrix with non-zero diagonal elements is obtained. The function needs to record the swapping process by creating a permutation matrix, P. Use this function to solve the system. Set the tolerance for relative norm of residuals to 0.01, and report the number of iterations needed to reach this accuracy.
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