How can I write a series function?

12 vues (au cours des 30 derniers jours)
Alaska Gry
Alaska Gry le 17 Fév 2019
Write a function that gives sum of the series given by
Sn=550+2+3+6+11+...+(n^2-2*n+3)
for different values of n.

Réponses (1)

Geoff Hayes
Geoff Hayes le 17 Fév 2019
Alaska - this seems like a homework question. Presumably n starts at one and then goes to what exactly? If you know the upper bound then you could either use a for loop or you could use vectorization to determine an answer.

Catégories

En savoir plus sur Time Series Events dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by