CS/MA 321-001 Project #1 1. Complete the following MATLAB program for the Naive Gaussian Elimination to solve the linear

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

CS/MA 321-001 Project #1 1. Complete the following MATLAB program for the Naive Gaussian Elimination to solve the linear

Post by answerhappygod »

Cs Ma 321 001 Project 1 1 Complete The Following Matlab Program For The Naive Gaussian Elimination To Solve The Linear 1
Cs Ma 321 001 Project 1 1 Complete The Following Matlab Program For The Naive Gaussian Elimination To Solve The Linear 1 (391.87 KiB) Viewed 37 times
I am very confused on what to do here.
CS/MA 321-001 Project #1 1. Complete the following MATLAB program for the Naive Gaussian Elimination to solve the linear system of equations Az = b. function x = Gauss_Naive(A,b) % Function x = Gauss_Naive (A,b) finds the solution x of the linear system % Ax = b by the Naive Gaussian Elimination, where the input A is an % n-by-n matrix and b is a vector of length-n. 2. Select a reasonable value of n and generate a random nxn matrix A (using A = randn(n,n)). Define the vector b such that the solution of the system Ax = b is a vector x with entries x(j) = j for j = 1, 2,..., n. Test the Gauss Naive on this system. 3. Modify Gauss_Naive to include partial pivoting scheme (i.e., select the pivot row to be the one with the maximum pivot entry in absolute value from those in the leading column of the reduced submatrix). function x = Gauss_Pivoted (A,b) % Function x = Gauss_Pivoted (A,b) finds the solution x of the linear system % Ax = b by Gaussian Elimination with partial pivoting, where the input A is % an n-by-n matrix and b is a vector of length-n. 4. Test Gauss Pivoted on the linear system from item 2. Then compare the residual vector r = Ax – b of the solution computed by Gauss Pivoted and Gauss Naive. Which method is more accurate? (You can simply compare the norm of r computed by norm(r).)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply