sprintf and minus sign problem
Mostrar comentarios más antiguos
I have a problem understanding the sprintf function in a specific case:
sprintf('%.2f', 0)
produces: "0.00" , as expected.
In my case I have a variable [value] that should equal 0:
value == 0
ans = 1
but
sprintf(%.2f, value)
results in "-0.00" (a minus sign is added)
Is there any chance that [value] still contains something different from 0, eventhough value == 0 retuns TRUE?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Code Performance en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!