set.seed(42)
n <- 600
dt <- seq_len(n)
p1 <- 30
p2 <- 240
s30 <- (1 + 0.6 * sin(dt*2*pi/p2)) * sin(dt*2*pi/p1)
s240 <- 2 * sin(dt*2*pi/p2)
xy <- s30 + s240
dec <- as.emd(xy = xy, dt = dt, imf = matrix(c(s30, s240), ncol = 2))
plot_emd(dec, pdf = FALSE, style = 1)
pulse <- inst.pulse(dec, last = TRUE, breaks = 200, bins = 40, cut = 10)
is.pulse(pulse)
simp.pulse <- as.pulse(pulse$dt, pulse$f)
str(simp.pulse)
Run the code above in your browser using DataLab