Question: A = np . random.normal , size = ( n , n ) np . identity ( n ) b = n p . random.normal

A= np.random.normal , size =(n,n) np.identity (n)
b=np. random.normal , size =(n,1)
Two cases: (1)n=150,(2)n=250(here np means numpy)
Ax=b
A and b : We use the same A and b as in Problem )=150,n=(250
(i) Use Python or MATLAB to construct the Jacobi algorithm and find the solution
(ii) Use Python or MATLAB to construct the Gauss-Seidel algoroithm and find the solution
(iii) For both algorithms, you obtain the convergence plot of the solution (as I provided in the slides)
(iv) Plot ||x-xk||2 for each k where x is the true solution (you can use "numpy.linalg.solve" in Python or "linprog" in MATLAB to obtain the true solution) and x-k is the solutions obtained from the two algorithms ((i) and (ii)) in each step.
compare the computation time and accuracy of
Jacobi Algorithm
Gauss-Seidel algorithm
numpy.linalg.solve in Python or linprog in MATLAB
 A= np.random.normal , size =(n,n) np.identity (n) b=np. random.normal , size

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!