simp.emd | R Documentation |
Simplifies the component of an EMD to only extremas and zero-crossings, and outputs problematic extrema: multiple extrema (extrema not separated by zero-crossings) and crossing extrema (extrema at zero).
simp.emd(emd = NULL, m = NULL, dt = NULL, repl = 1, use.names = FALSE)
emd |
emd-type object |
m |
a matrix of the amplitude values (xy) of the components, each column being a component. Each column should have the same number of non NA values. Vectors, for 1 component, are accepted. Is overridden by emd. |
dt |
the depth or time value. Is overridden by emd. |
repl |
the amount of replicates in m. Is overridden by emd. |
use.names |
whether to use the column names to identify problematic extrema |
a list of the depth or time values ($dt) of the simplified IMF (Intrinsic Mode Function), of their amplitude ($xy), and of the position and component of problematic multiple extrema ($multiple_extrema) and crossing extrema ($crossing_extrema)
xytest <- c(0.5, 1,-1,-0.85,-0.5,-1,-0.5,-1,1,0.5,0,0, 1,-1,0,1,2,-2,1,2,1,3,0,-1,-1,3,0) repeatafterme <- 2 m <- matrix(rep(xytest,repeatafterme), ncol = repeatafterme) dt <- 1:length(xytest) res <- simp.emd(m = m, dt = dt, repl = repeatafterme) opar <- par("mfrow") par(mfrow = c(1,1)) plot(dt, xytest, type = "o", pch = 19) abline(h = 0, col = "grey") me <- res$multiple_extrema$dt[res$multiple_extrema$repl == 1] ce <- res$crossing_extrema$dt[res$multiple_extrema$repl == 1] abline(v = me, col = "orange") abline(v = ce, col = "darkred") points(res$dt[,1], res$xy[,1], col = "red", pch = 19) par(mfrow = opar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.