Chapter E: MATLAB for systems biology #
- What is the ideal way to compare if two floating-point numbers are equal, in MATLAB?
a.
abs(A-B) < 1e-12
b.A – B == 0
c.A == B
d.floor(A) == floor (B)
Ans: a
abs(A-B) < 1e-12
A – B == 0
A == B
floor(A) == floor (B)
Ans: a