x = sin(2 * pi * (1:100) / 15) * seq(1, 5, length.out = 100)
idx_na = c(1:4, 6, 7, 14, 25, 30:36, 39, 40, 42, 45:50,
57, 59, 62, 66, 71:79, 98)
x[idx_na] = NA
soundgen:::findInflections(x, plot = TRUE)
soundgen:::findInflections(x, thres = 5, plot = TRUE)
for (i in 1:10) {
temp = soundgen:::getRandomWalk(len = runif(1, 10, 100), rw_range = 10,
rw_smoothing = runif(1, 0, 1))
soundgen:::findInflections(temp, thres = 1, plot = TRUE)
invisible(readline(prompt="Press [enter] to continue"))
}
Run the code above in your browser using DataLab