Question: Write a function in MATLAB that takes as input a symmetric tridiagonal matrix represented as two vectors: an 1 n vector v representing the main
Write a function in MATLAB that takes as input a symmetric tridiagonal matrix represented as two vectors: an 1 n vector v representing the main diagonal and an 1 (n 1) vector w representing the upper (and lower) diagonal. Have this function output the Cholesky factor of the matrix as a vector for the main diagonal and a vector for the upper diagonal. To make sure your code works, if you input v = [4, 4, 4, 4, 4, 4] and w = [1, 1, 1, 1, 1], your program should output the vectors [2, 1.94, 1.93, 1.93, 1.93, 1.93] and [.5, .516, .518, .518, .518].
For big matrices, this algorithm is more efficient than the standard Cholesky method. For a 100 100 matrix, what percentage of the memory do we need to store our matrix, compared to the naive method? About what percentage of flops do we compute, compared to the naive method?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
