Answered step by step
Verified Expert Solution
Question
1 Approved Answer
#Matlab #GaussianElimination MACM 316 - Computing Assignment 2 . Read the Guidelines for Assignments first Submit a one-page PDF report to Canvas and upload you
#Matlab #GaussianElimination
MACM 316 - Computing Assignment 2 . Read the Guidelines for Assignments first Submit a one-page PDF report to Canvas and upload you Matlab scripts (as m-files). Do not use any other file formats. . Keep in mind that Canvas discussions are open forums . You must acknowledge any collaborations/assistance from colleagues, TAs, nstructors etc. Failure of Gaussian Elimination with Partial Pivoting There are several well-known examples of matrices for which Gaussian elimination with partial pivoting fails to give an accurate result. The file mymat.m on Canvas constructs one such matrix. The goal of this assignment is to compare the accuracy and efficiency of partial pivoting and complete pivoting for this matrix. Download the files mymat.m, GaussElim.m (which performs Gaussian elimination with partial pivoting) and gecp.m (which performs Gaussian elimination with complete pivoting) from Canvas The syntax for each is presented in the box below. Amymat(n); zGaussElim (A,b); zgecp (A,b); You'll need to construct a system to solve using both methods. Create a random vector x and set b-Ar. You now have a right-hand side vector and an exact solution. We are interested in how the accuracy and efficiency of each algorithm changes with respect to n, the size of the matrix. Run the codes for several values of n. Since r is random, you should also run the codes over several trials at each n and take an average of your results MACM 316 - Computing Assignment 2 . Read the Guidelines for Assignments first Submit a one-page PDF report to Canvas and upload you Matlab scripts (as m-files). Do not use any other file formats. . Keep in mind that Canvas discussions are open forums . You must acknowledge any collaborations/assistance from colleagues, TAs, nstructors etc. Failure of Gaussian Elimination with Partial Pivoting There are several well-known examples of matrices for which Gaussian elimination with partial pivoting fails to give an accurate result. The file mymat.m on Canvas constructs one such matrix. The goal of this assignment is to compare the accuracy and efficiency of partial pivoting and complete pivoting for this matrix. Download the files mymat.m, GaussElim.m (which performs Gaussian elimination with partial pivoting) and gecp.m (which performs Gaussian elimination with complete pivoting) from Canvas The syntax for each is presented in the box below. Amymat(n); zGaussElim (A,b); zgecp (A,b); You'll need to construct a system to solve using both methods. Create a random vector x and set b-Ar. You now have a right-hand side vector and an exact solution. We are interested in how the accuracy and efficiency of each algorithm changes with respect to n, the size of the matrix. Run the codes for several values of n. Since r is random, you should also run the codes over several trials at each n and take an average of your resultsStep 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