Unexpected for loop behaviour
Mostrar comentarios más antiguos
This for loop is supposed to run for 2 iterations i.e. for i=0 and i=-0.1 as variable outputOverVoltageChange_65 = -0.1. Why is it running for only i=0?

2 comentarios
Renato SL
el 9 de Jul. de 2019
I assume you post this question because in the output you get, there is only 1 set of entry but you expect 2.
So, can you post a screenshot/photo of the output and highlight the fact that there is only 1 entry there?
Thank you.
Walter Roberson
el 9 de Jul. de 2019
Your variable is not exactly what you think it is, or 0:-0.1:something does not generate exactly the values you expect. Remember that 0.1 cannot be exactly represented in binary floating point.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Programming en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!