필터 지우기
필터 지우기

cond() for sparse matrices

조회 수: 17 (최근 30일)
Oliver Dellar
Oliver Dellar 2015년 7월 8일
댓글: Oliver Dellar 2015년 7월 8일
When you use the cond() function with a dense matrix it defaults to using the 'normal' (2-norm) definition, unless you supply the optional argument to specify that you want to use a different norm variant.
For sparse matrices Matlab forces you to use condest() which produces the 1-norm variant condition number, and it is not possible to use the 'normal' (2-norm) variant. Why is this? Why can one not compute the 'normal' condition number of a sparse matrix?

채택된 답변

Brendan Hamm
Brendan Hamm 2015년 7월 8일
I would assume that the why has to do with the simplicity with which one can calculate the 1-norm of a sparse matrix. Both cond and condest use different algorithms for computing the norms, and different functions meant to handle sparse matrices. It is possible this is also due to the assumption that if one is using sparse matrices time and/or memory is of concern to the user, so different methods are appropriate for that individual. If you really want to calculate the 2-norm variant of condition number, just cast your sparse matrix to a full one.
sparseMat = gallery('poisson',10)
cond(full(sparseMat))
  댓글 수: 1
Oliver Dellar
Oliver Dellar 2015년 7월 8일
Okay, makes sense - thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Sparse Matrices에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by