I'm trying to compare three numbers in a if statement but they don't match even if they are the same.
here are the numbers from the command window,
>> a = (round2(final_aucscore(10, 1),1e-4))
a =
0.9369
>> b = (round2(final_aucscore(10, 2),1e-4))
b =
0.9598
>> c = (round2(final_aucscore(10, 3),1e-4))
c =
0.9509
the function round2
can be found in the file echange here.
here's my code:
for mmm = 1:265
a = (round2(final_aucscore(mmm, 1),1e-4));
b = (round2(final_aucscore(mmm, 2),1e-4));
c = (round2(final_aucscore(mmm, 3),1e-4));
if a == 0.9369 && b == 0.9598 && c == 0.9509
auc_idx = idx(1:kk);
save('auc_idx', 'auc_idx', 'mmm');
break;
end
end
shouldn't it stop and save when mmm = 10
?