Can someone help me with a question to do with sequences and creating a function file that find n terms of sequence
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Abdullaziz Errayes
le 11 Déc 2016
Modifié(e) : Roger Stafford
le 12 Déc 2016
Can someone show me the function file that would calculate the first n terms of this sequence a_i=a_(i-1)+3i as well as the sum of the first n terms please!
0 commentaires
Réponse acceptée
Roger Stafford
le 12 Déc 2016
Modifié(e) : Roger Stafford
le 12 Déc 2016
a = a_0 + cumsum(3:3:3*n); % The sequence of first n terms
s = sum(a); % The sum of these
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Get Started with MATLAB 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!