time_series <- sin(seq(0, 20 * pi, length.out = 100))
# Using a numeric vector
cwt(t = time_series,
scales = c(1, 2, 3, 4, 5),
summed_wavelet = FALSE)
cwt(t = time_series,
scales = c(1, 2, 3, 4, 5),
summed_wavelet = TRUE)
# Using a matrix
times <- 100
frame <- matrix(rep(time_series, times),
nrow = times,
byrow = TRUE)
cwt(t = frame,
scales = c(1, 2, 3, 4, 5),
summed_wavelet = FALSE)
cwt(t = frame,
scales = c(1, 2, 3, 4, 5),
summed_wavelet = TRUE)
Run the code above in your browser using DataLab