# Chirp signal with increasing frequency
t <- seq(0, 10, length.out = 500)
freq <- 0.5 + 0.1 * t # Frequency increases from 0.5 to 1.5
X <- matrix(sin(2 * pi * cumsum(freq) * diff(c(0, t))), nrow = 1)
fd <- fdata(X, argvals = t)
# Estimate instantaneous period
inst <- instantaneous.period(fd)
# plot(inst$period) # Shows decreasing period over time
Run the code above in your browser using DataLab