error in subtracting
Show older comments
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
Accepted Answer
More Answers (1)
Andreas Goser
on 27 Jun 2012
0 votes
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.
Categories
Find more on Containers in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!