Question
Programming: 1. Let A be a symmetric, positive definite, tridiagonal matrix. We store A as two vectors: an n 1 vector v representing the main
Programming: 1. Let A be a symmetric, positive definite, tridiagonal matrix. We store A as two vectors: an n 1 vector v representing the main diagonal and an (n 1) 1 vector w representing the upper diagonal. Using basic programming (for loops, while loops, and if statements): (a) Write a function that inputs dimension n; column vectors v, w; then uses the inner product formulation of Choleskys method to find the Cholesky factor, and then outputs the number of flops used. Print out or write out this function and turn it in. (b) Run your program for n = 10, 100, 400, and v the vector of all 2s and w the vector of all 1s. Print out or write out your results and turn them in.
Programming: 1. Let A be a symmetric, positive definite, tridiagonal matrix. We store A as two vectors: an n 1 vector v representing the main diagonal and an (n -1) x 1 vector w representing the upper diagonal. Using basic programming (for loops, while loops, and if statements): (a) Write a function that inputs dimension n; column vectors v, w; then uses the inner product formulation of Cholesky' s method to find the Cholesky factor, and then outputs the number of flops used. Print out or write out this function and turn it in. (b) Run your program for n - 10, 100, 400, and v the vector of all 2' s and w the vector of all 1' s. Print out or write out your results and turn them in Programming: 1. Let A be a symmetric, positive definite, tridiagonal matrix. We store A as two vectors: an n 1 vector v representing the main diagonal and an (n -1) x 1 vector w representing the upper diagonal. Using basic programming (for loops, while loops, and if statements): (a) Write a function that inputs dimension n; column vectors v, w; then uses the inner product formulation of Cholesky' s method to find the Cholesky factor, and then outputs the number of flops used. Print out or write out this function and turn it in. (b) Run your program for n - 10, 100, 400, and v the vector of all 2' s and w the vector of all 1' s. Print out or write out your results and turn them inStep 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