sparse matrix with higher than double precision

15 vues (au cours des 30 derniers jours)
Jacob Bresler
Jacob Bresler le 1 Août 2016
Modifié(e) : Thorsten le 1 Août 2016
hey guys, so I am currently working on a problem where all of my matrices are banded, but I am using the symbolic toolbox to set my floating point precision higher than that of double (I kind of have to since some of the numbers I am dealing with are really small). The issue with this is that you can't turn a sym array into a sparse matrix since matlab doesn't seem to allow that. does anyone have any suggestions?
  1 commentaire
Stephen23
Stephen23 le 1 Août 2016
Modifié(e) : Stephen23 le 1 Août 2016
"some of the numbers I am dealing with are really small"
What order and how many digits ?

Connectez-vous pour commenter.

Réponses (1)

José-Luis
José-Luis le 1 Août 2016
Modifié(e) : Thorsten le 1 Août 2016
The number of significant digits that you can store in a double is what limits things. As such, the smallness of the number doesn't really matter unless the values in your array span many orders of magnitudes and you need to keep more than (around) 15 digits.
If 15 significant digits is enough for you, you could always scale them, keep an index of the scaled numbers, and store as a double in a sparse array.
Please note that I don't have the symbolic math toolbox and I am taking you to your word that a sparse symbolic array cannot be generated.

Community Treasure Hunt

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

Start Hunting!

Translated by