How to increment from 1 to 0.0000000001 (9 zeros) in 11 rows, 1 column (divide by 10 each time)
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (2)
Star Strider
el 22 de Feb. de 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 comentarios
Jos (10584)
el 22 de Feb. de 2019
Editada: Jos (10584)
el 22 de Feb. de 2019
format long % for display purposes only
v = 10.^(0:-1:-10).'
0 comentarios
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!