Sum of numeric string.
6 views (last 30 days)
I have a mathematical function.This's a numeric string. How can i calculate sum of numeric string? Example: Sum of (1/3^n) with n from n to extend at infinity And what is symbol of infinity in matlab? Thanks.
Naz on 30 Nov 2011
I hope you realize that computer has finite memory and can not run it forever to reach your infinity, so you gonna have to stop somewhere :). Here's what you can do:
Walter Roberson on 30 Nov 2011
If you have the symbolic toolbox,
symsum(sym('1/3')^n, n, n, inf)
Please, though, recheck that your lower bound is really "n" just like the variable of summation. Using the same variable in both places can lead to some odd calculations. Did you perhaps mean that n should be from 1 to infinity? If so then put 1 in place of the parameter that is before infinity (the lower bound of the summation.)