The FIND command returns an empty matrix for a number I know exists

I am trying to find index of variable in a array. Its value is changing in a loop and corresponding to existing array e.g.
z1 = zphoton(k,i)+(delz);
index = find(zpos ==round(z1*1000)/1000,1);
delz =delz+0.001
I know all values of z1 are in zpos but still I am getting empty matrix as index. Can someone please provide prompt response ?
Thanks AS

Asked:

on 22 Apr 2014

Answered:

on 22 Apr 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!