symmetric tridiagonal matrix matlab
조회 수: 15 (최근 30일)
이전 댓글 표시
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
Geoff Hayes
2015년 10월 12일
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?
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!