How to increment from 1 to 0.0000000001 (9 zeros) in 11 rows, 1 column (divide by 10 each time)
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi everyone,
I was just a bit confused with how you increment a number list. I wanted to increment from 1 to 0.0000000001 (9 zeros) in a 1 columm 11 row format for a table. So basically divide each time by 10. Would it be some kind of loop because mine was simply not working. Thank you!
0 Commenti
Risposte (2)
Star Strider
il 22 Feb 2019
v = logspace(0, -9, 10)'
to get:
v =
1.000000000000000
0.100000000000000
0.010000000000000
0.001000000000000
0.000100000000000
0.000010000000000
0.000001000000000
0.000000100000000
0.000000010000000
0.000000001000000
0 Commenti
Jos (10584)
il 22 Feb 2019
Modificato: Jos (10584)
il 22 Feb 2019
format long % for display purposes only
v = 10.^(0:-1:-10).'
0 Commenti
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!