a = [ 1 2 3 3 3];
如果a==3
返回[ 0 0 1 1 1];
find(a==3)
返回[3 4 5],这才是想要的下标。
Matlab中find函数陷阱
原文:http://www.cnblogs.com/hxsyl/p/5040927.html