Borrar filtros
Borrar filtros

cond() for sparse matrices

17 visualizaciones (últimos 30 días)
Oliver Dellar
Oliver Dellar el 8 de Jul. de 2015
Comentada: Oliver Dellar el 8 de Jul. de 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?

Respuesta aceptada

Brendan Hamm
Brendan Hamm el 8 de Jul. de 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 comentario
Oliver Dellar
Oliver Dellar el 8 de Jul. de 2015
Okay, makes sense - thanks!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Sparse 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!

Translated by