how to write a geometric series in command window
74 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
How do I write a vector that follows the geometric form: 1, 3, 6, 9...
10 Commenti
Torsten
il 8 Set 2022
But note that you need 1 as first term followed by 99 terms of the form 1/(3*i).
1./(3:3:300) gives 100 terms of the form 1/(3*i).
Risposte (2)
KSSV
il 8 Set 2022
a = 1 ;
r = 2 ;
n = 0:9 ;
gp = a*r.^n
4 Commenti
Torsten
il 8 Set 2022
This is not a geometric sequence.
For a geometric sequence, the quotient of two subsequent members of the sequence must be constant:
a(n+1)/a(n) = q = const. for every n.
In your case:
a2/a1 = 3
a3/a4 = 2
a5/a4 = 1.5
so the quotient is always different.
Vedere anche
Categorie
Scopri di più su Directed Graphs in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!