generate a summation series
Ältere Kommentare anzeigen
3(2+1)+4(3+2+1)+5(4+3+2+1)+6(5+...1)+...+1000(999+...+1).
How to write a matlab code to calculate the following summation without using for loop?
i can see the trend for 3(2+1) if the n = 1 (n+2)[((n+2)-1)+((n+2)-2)].
Assume the summation only sum until 6th term.
can we use array to solve this?
2 Kommentare
ibraheem kanai
am 5 Jun. 2021

Walter Roberson
am 5 Jun. 2021
Bearbeitet: Walter Roberson
am 12 Jun. 2021
Akzeptierte Antwort
Weitere Antworten (1)
Walter Roberson
am 13 Aug. 2015
0 Stimmen
It does have a symbolic answer that you could find using nested symsum() if you have the symbolic toolbox.
But for a numeric answer: cumsum() and multiply by something gives a bunch of terms...
Kategorien
Mehr zu Matrix Indexing finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!