function c = cor(data,range) tmp=isi(link(data,range),1); c=[tmp;0]'*[0; tmp]/(length(tmp)-1); m=mean(tmp); c=c-m*m; c=c/var(tmp);