symsum returning a large fraction

조회 수: 9(최근 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 2017년 1월 22일
SUM may be of class sym, try
  댓글 수: 1
Andrew Chen
Andrew Chen 2017년 1월 22일
Thanks, this works!

댓글을 달려면 로그인하십시오.

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by