# NOT RUN {
Y <- dataSinusoidal(
1e4,
frequency = 1 / 1e3,
amplitude = 10,
type = "updown",
jumpSize = 4,
nbSeg = 4
)
res <- DeCAFS(Y$y)
plot(res, col = "grey")
lines(Y$signal, col = "blue", lwd = 2, lty = 2)
abline(v = res$changepoints, col = 2)
abline(v = Y$changepoints, col = 4, lty = 2)
# }
Run the code above in your browser using DataLab