symmetric tridiagonal matrix matlab
9 views (last 30 days)
Show older comments
I have no idea how to program this....Can someone break it down for me? Write a function in Matlab that takes as input the number n and a symmetric tridiagonal matrix given as two vectors: n by 1 vector v representing the main diagonal and (n-1) by 1 vector w representing the upper 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 and output the number of flops and, separately, the number of square roots used as well.
1 Comment
Geoff Hayes
on 12 Oct 2015
Celty - since this is a homework question, start with the function signature. What are your inputs to the function and what are the outputs? n is the dimension of your square matrix, v represents all of the elements along the main diagonal (and so there are n elements), and w represents all of the elements along the upper diagonal (this is the diagonal above the main diagonal) and so has n-1 elements. As for calculating the Cholesky factor, is that something that you have to code up yourself from an algorithm discussed in class?
Answers (0)
See Also
Categories
Find more on Operating on Diagonal Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!