![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/642710/Screenshot_%D9%A2%D9%A0%D9%A2%D9%A1%D9%A0%D9%A6%D9%A0%D9%A2-%D9%A1%D9%A7%D9%A1%D9%A2%D9%A1%D9%A4.png)
generate a summation series
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Odien
le 13 Août 2015
Modifié(e) : Walter Roberson
le 12 Juin 2021
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?
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 13 Août 2015
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...
0 commentaires
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!