function res=zcr(x)
res=length(find(diff(cumsum(sign(x)))==-1));