sum of series

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.

답변 (2개)

Richard Brown
Richard Brown 2012년 4월 11일

0 개 추천

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
Image Analyst 2012년 4월 11일
I think the x+1, x+2 etc. are subscripts (indexes) of his V array.
Richard Brown
Richard Brown 2012년 4월 11일
What we need here is LaTeX markup :)

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

Image Analyst
Image Analyst 2012년 4월 11일

0 개 추천

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.

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

질문:

2012년 4월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by