R/emd_num_imfs.R

Defines functions emd_num_imfs

Documented in emd_num_imfs

#' Number of IMFs
#' 
#' Return the number of IMFs extracted from input data of length N, including
#' the final residual. This is just [log_2(N)] for N>3.
#' @export
#' @name nIMFs
#' @param N An integer defining the length of input data.
#' @return The number of IMFs which would be extracted from input data of length N, including
#' the final residual. 
emd_num_imfs <- function(N) {  
  if (!isTRUE(N > 0) || !isTRUE(abs(N - round(N)) < 100 * .Machine$double.eps))
    stop("N must be a positive integer.")
  emd_num_imfsR(N)
}

Try the Rlibeemd package in your browser

Any scripts or data that you put into this service are public.

Rlibeemd documentation built on Sept. 8, 2023, 5:55 p.m.