two value difference is not complete 0. how can make it complete 0?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Sarfaraz Ahmed
am 12 Nov. 2018
Kommentiert: Sarfaraz Ahmed
am 12 Nov. 2018
Hi, I am using eq function to see the difference but when i get these two values it's not giving right answer. fo example : when I get a=0.164, b=0.164 then output of eq function should be 1 but it produce 0. can anyone please help in this problem ? Thanks
function y = op(a,b)
x= eq(a,b);
if (x ~=0)
out=0;
else
out=1;
end
y = out;
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!