Effacer les filtres
Effacer les filtres

cond() for sparse matrices

17 vues (au cours des 30 derniers jours)
Oliver Dellar
Oliver Dellar le 8 Juil 2015
Commenté : Oliver Dellar le 8 Juil 2015
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?

Réponse acceptée

Brendan Hamm
Brendan Hamm le 8 Juil 2015
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 commentaire
Oliver Dellar
Oliver Dellar le 8 Juil 2015
Okay, makes sense - thanks!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Sparse 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!

Translated by