x <- c(rep(0,1000),rep(0.5,1000),rep(0,1000))
v <- x + rnorm(n = 3000, sd = 1.0) # normally-distributed random variates
z <- kza(v,200,m=10)
par(mfrow=c(3,1))
plot(v,type="l")
plot(z,type="l")
s <- kzsv(z,200)
plot(s/mean(s),type="l")
Run the code above in your browser using DataLab