symmetric tridiagonal matrix matlab
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Geoff Hayes
el 12 de Oct. de 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?
Respuestas (0)
Ver también
Categorías
Más información sobre Operating on Diagonal Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!