matlab wont generate vector, [1E-15:10:1E-12]
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Juan Marquez
el 25 de Mzo. de 2016
Comentada: Juan Marquez
el 25 de Mzo. de 2016
It will generate vectors with much simpler inputs, but not this one.
0 comentarios
Respuesta aceptada
John D'Errico
el 25 de Mzo. de 2016
How many elements does the vector have that you desire to see? That 10 in there is not the number of steps to be taken, but the additive increment.
The first element will be 1e-15.
Ok, then the increment is 10, so we will have 1e-15 + 10. Oh. But that exceeds 1e-12. Darn. So MATLAB gives up at 1e-15. What is the problem, except for not knowing how the colon operator is defined to work? I'll guess that you really wanted to use either linspace or logspace?
Don't forget to use the right display format for that result too. With some display formats, 1e-15 may be displayed as zero.
help format
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrices and Arrays en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!