I am implementing a variation of eulers method and my iterations last 1 too long because my while loop returns true for 1.00000 < 1.
t = 0.1;
for N = 1:9
t = t + 0.1;
end
>> t
t =
1.0000
>> t < 1
ans =
1
>> 1 < 1
ans =
0
I tried converting the 1 to a double but it does not work. (e.g. t < double(1) ). I cannot turn t into an integer because the end of my domain shouldn't be confined to be a integer.