{
# Example data generation:
# Set the number of observations
N <- 300
# Set a random seed for reproducibility
set.seed(123)
# Generate random uniform values
rand_unif <- runif(n = N, min = 0, max = 1.0)
# Create the components of the time series
sig1 <- 6 * rand_unif
sig2 <- sin(8 * pi * rand_unif) # Using sine function
sig3 <- 0.5 * sin(40 * pi * rand_unif) # Using sine function
# Combine the components to form the final signal
signal <- sig1 + sig2 + sig3
# Apply the sVMD function to the signal
result <- sVMD(signal)
}
Run the code above in your browser using DataLab