Greater than is giving inconsistent answer
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Amanda Beatty
el 9 de Sept. de 2021
Editada: Amanda Beatty
el 9 de Sept. de 2021
I am running two (slightly different) matalb programs in two different windows and getting incosistent answers on a very simple "greater than" equation. It is baffling me. 0.0417 is SOMETIMES > 0.0417, but not other times.
What am I missing here?
Window #1
Window #2
0 comentarios
Respuesta aceptada
Image Analyst
el 9 de Sept. de 2021
They're probably off in the 15th decimal place or something. Try this
format long
If that doesn't work try
fprintf('%30f\n', ans2);
There should be a difference somewhere. See the FAQ:
1 comentario
Amanda Beatty
el 9 de Sept. de 2021
Editada: Amanda Beatty
el 9 de Sept. de 2021
Más respuestas (0)
Ver también
Categorías
Más información sobre Fourier Analysis and Filtering 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!