how to write a geometric series in command window
65 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How do I write a vector that follows the geometric form: 1, 3, 6, 9...
10 Kommentare
Torsten
am 8 Sep. 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).
Antworten (2)
KSSV
am 8 Sep. 2022
a = 1 ;
r = 2 ;
n = 0:9 ;
gp = a*r.^n
4 Kommentare
Torsten
am 8 Sep. 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.
Siehe auch
Kategorien
Mehr zu Directed Graphs finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!