This is a common error with floating point precision, the numbers are not actually the same:
t = 1:1/400:10;
d = 5.565;
m = find(t == d)
[~,nearest]=min(abs(t-d));
t(nearest) % looks the same?
d==t(nearest) % but it isn't equal
d-t(nearest) % the values are ever so slightly different
% Here's the common workaround:
tol = 1e-10; %whatever is appropriate for your data
find(abs(t-d)<tol)
Here's a wikipedia about floating point error mitigation: https://en.wikipedia.org/wiki/Floating-point_error_mitigation
Here's a nice description about floating point from Cleve: https://blogs.mathworks.com/cleve/2014/07/07/floating-point-numbers/
If you search for "floating point error", or "floating point error matlab" you'll find lots more resources.
Note that there are a few functions in MATLAB that take a tolerance, like ismembertol but there's no isequaltol
