symmetric tridiagonal matrix matlab
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Geoff Hayes
am 12 Okt. 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?
Antworten (0)
Siehe auch
Kategorien
Mehr zu Operating on Diagonal Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!