Issues using Summation in Matlab
Show older comments
Hi, just want to confirm whether the code that I have below is indeed correct or there are changes that is needed to solve. I have values of "n' and "d" that I have to input but the summation tool id new to me
syms i n d
SMD = symsum(n*d^3/(n*d^2),i,1,N)
formula: 

Accepted Answer
More Answers (1)
Walter Roberson
on 6 Jul 2022
Edited: Walter Roberson
on 6 Jul 2022
never use symsum to form the sum of a vector of values. The variable of summation for symsum is always symbolic, but symbolic values can never be used to index anything.
symsum should only be used when you are working with formulas, such as
symsum((-1)^n / 2^n, n, 1, m)
hoping to get out a function like (-1/2)^m/3 - 1/3
1 Comment
Matthew Charles
on 6 Jul 2022
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!