sum of series
1 次查看(过去 30 天)
显示 更早的评论
Hello to all I need to calculate the sum of series: S= (Vx+1 - Vx)+(Vx+2 - Vx)+ (Vx+3 - Vx)+ (Vx+...-Vx) while x changes and increases form 1 to 12 x=1:12 How to do it right and elegant? Thanks a lot.
0 个评论
回答(2 个)
Richard Brown
2012-4-11
I think you may need to try and ask your question more clearly. What you've written there reduces to 1 + 2 + 3 + ...
If it's an infinite sum, it obviously diverges, if not it's just n*(n+1)/2
2 个评论
Image Analyst
2012-4-11
Sounds like a homework problem. So you need to look up sum(V(1:12)) or cumsum(V(1:12)) - that should give you a big hint.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!