error in subtracting
Mostrar comentarios más antiguos
I have a code
if Sparse_Conc_Index>=1
---------
---------
---------
Class_Image = (Image_Path);
figure,imshow(Class_Image)
else
msgbox('Invalid Image ','ALERT')
end
if i do
F=1-Sparse_Conc_Index
i get
F = 5.1341e-011
please tell how to get F as zero
Respuesta aceptada
Más respuestas (1)
Andreas Goser
el 27 de Jun. de 2012
0 votos
The point is that 5.1341e-011 IS actually almost zero. It depends now on your application what is the best approach. Very often comparisions are made in a way that you don't compare with ==, but with a tolerance.
1 comentario
kash
el 27 de Jun. de 2012
Categorías
Más información sobre Dynamic System Models 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!