Question: Computer Science ---Numerical Computation for Algebraic Problems---linear system 3. Write a MatlAB function that solves pentadiagonal systems of equations of size n. A pentadiagonal matrix

Computer Science ---Numerical Computation for Algebraic Problems---linear system 3. Write a MatlABComputer Science ---Numerical Computation for Algebraic Problems---linear system

3. Write a MatlAB function that solves pentadiagonal systems of equations of size n. A pentadiagonal matrix is a banded one with bandwidth - 5 and p q 3. Assume that no pivoting is needed, but do not assume that the matrix A is symmetric. Your program should expect as input six vectors of size n, n - 1 or n - 2: one right hand side b and the five nonzero diagonals of A It should calculate and return x-A-'b using a Gaussian elimination variant that requires O(n) flops and consumes no additional space as a function of n (i.e., in total 7n storage locations are required) Try your program on the matrix defined by n 100.000, ai,2-ai+24 2, ai,i+1-ai+1,i = _i, and ai,i 82, for all i such that the relevant subscripts fall in the range 1 to n. Derive a right hand side vector b Axexact using Xeract (1, 1,..., 1,1)T. Then solve for x given this b and record |leract xl 2. 3. Write a MatlAB function that solves pentadiagonal systems of equations of size n. A pentadiagonal matrix is a banded one with bandwidth - 5 and p q 3. Assume that no pivoting is needed, but do not assume that the matrix A is symmetric. Your program should expect as input six vectors of size n, n - 1 or n - 2: one right hand side b and the five nonzero diagonals of A It should calculate and return x-A-'b using a Gaussian elimination variant that requires O(n) flops and consumes no additional space as a function of n (i.e., in total 7n storage locations are required) Try your program on the matrix defined by n 100.000, ai,2-ai+24 2, ai,i+1-ai+1,i = _i, and ai,i 82, for all i such that the relevant subscripts fall in the range 1 to n. Derive a right hand side vector b Axexact using Xeract (1, 1,..., 1,1)T. Then solve for x given this b and record |leract xl 2

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!