Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 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, aii+,-ai+2,i-1, i41 ai1i-2i, and ai 8i, fora such that the relevant subscripts fall in the range 1 to n. Derive a right hand side vector bAxerct using Xeract = (1, l' . . . , 1, )". Then solve for x given this b and record 11x,rad-X112. 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 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, aii+,-ai+2,i-1, i41 ai1i-2i, and ai 8i, fora such that the relevant subscripts fall in the range 1 to n. Derive a right hand side vector bAxerct using Xeract = (1, l' . . . , 1, )". Then solve for x given this b and record 11x,rad-X112
Step 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