Description Usage Arguments Examples
View source: R/extract_subsignals.R
A subsignal is defined as a sequence of nonzero values in x
.
Therefore, elements near 0 are discarded and only the remaining nonzero
elements of x
are kept.
1 |
x |
A numeric vector (signal-values - see |
... |
Additional arguments (currently ignored) |
1 2 3 4 5 6 7 8 9 10 11 12 | # create a dummy vector, simulating measurement data
# NOTE: the values of `x` are the same as their index
x <- c(1:4, 0, 6:8, 0, 0, 11:15)
x
# NOTE: start indices: c(1, 6, 11)
# end indices: c(4, 8, 15)
indices <- mbte_default_indexer(x)
indices
# show first subsignal:
x[indices$start[1]:indices$end[1]] # c(1, 2, 3, 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.