symmetric tridiagonal matrix matlab
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Geoff Hayes
le 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?
Réponses (0)
Voir également
Catégories
En savoir plus sur Operating on Diagonal Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!