symsum returning a large fraction

4 ビュー (過去 30 日間)
Andrew Chen
Andrew Chen 2017 年 1 月 22 日
コメント済み: Andrew Chen 2017 年 1 月 22 日
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!

採用された回答

Niels
Niels 2017 年 1 月 22 日
SUM may be of class sym, try
SUM=double(SUM)
  1 件のコメント
Andrew Chen
Andrew Chen 2017 年 1 月 22 日
Thanks, this works!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by