Effacer les filtres
Effacer les filtres

symsum returning a large fraction

3 vues (au cours des 30 derniers jours)
Andrew Chen
Andrew Chen le 22 Jan 2017
Commenté : Andrew Chen le 22 Jan 2017
I am using the symsum command to obtain a value for the summation of a series. My specific code is
syms g
SUM = symsum(.9^g,g,0,20);
The answer given to me by matlab is 890581010868487640791/100000000000000000000. I can't seem to change the formatting of the value, any help is appreciated!

Réponse acceptée

Niels
Niels le 22 Jan 2017
SUM may be of class sym, try
SUM=double(SUM)
  1 commentaire
Andrew Chen
Andrew Chen le 22 Jan 2017
Thanks, this works!

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by