I just discovered a very very odd thing: "find" doesn't find anything in MATLAB 7.8.0 (R2009a) when using "random" function!!! Does anyone know the reason? For example:
b=random('unif',1,3,1,4)
b =
1.2978 2.7994 1.9008 1.4113
find(b==2.7994)
ans =
Empty matrix: 1-by-0
As you can see the second element is 2.7994.
The interesting point is that when I manually defined b as follows, "find" could produce correct ouput:
b=[1.2978 2.7994 1.9008 1.4113]
b =
1.2978 2.7994 1.9008 1.4113
find(b==2.7994)
ans =
2
Do you know why?
Thanks.