MATLAB: In a randomly generated matrix how to find the position(row and column) of an element by using its value

MATLABmatrix array

Ive created a 5×5 matrix using the rand() function
A=rand(5)
0.4427 0.8173 0.8001 0.1455 0.1450
0.1067 0.8687 0.4314 0.1361 0.8530
0.9619 0.0844 0.9106 0.8693 0.6221
0.0046 0.3998 0.1818 0.5797 0.3510
0.7749 0.2599 0.2638 0.5499 0.5132
B=find(a==0.0844)
after i enter the above code for finding the position of that particular element, the output becomes " 0x1 empty double column vector "
Im literally a newbie to matlab software so kindly help me

Best Answer

Your matrix has floating point numbers..you cannot get the value you want using like that. You should use:
tol = 10^-5 ; % tolerance
B = find(abs(A-0.0844)<tol)