Can anyone help with this problem(USE MATLAB)? Define the n × n matrix 3 -1 0 0
ID: 3167692 • Letter: C
Question
Can anyone help with this problem(USE MATLAB)?
Define the n × n matrix 3 -1 0 0 -1 3-1 0 10 3-1 0 -1 3 Define b = 2.5, 1.5, . . . , 1.5, 1, 1,15, . .. , 1.5.2.5]T so that the exact solu- tion of the system Ax = b is the vector of all ones. Taking n = 2000 use appropriate mathematical software (such as MATLAB®) to solve the given linear system using: Gaussian elimination with partial pivoting » Jacobi iteration Gauss-Seidel iteration Record the CPU time and the number of iterations for each iterative method. In the last two methods, stop the iteration if Ax()-bloc/ blocExplanation / Answer
The Matlab codes are given as
a) Gaussian elimination with partial pivoting
c) Gauss-siedel iteration