x <- c(rep(0,1000),rep(0.5,1000),rep(0,1000))
set.seed(1)
v <- x + rnorm(n = 3000, sd = 1.0) # normally-distributed random variates
z <- kza(v,100)
z <- z[[1]]
d <- rep(0,3000)
f <- kzf(v,100,d)
f <- f[[5]]
s <- kzsv(z,100,f)
plot(s[[1]],type="l")
Run the code above in your browser using DataLab