Method for finding Local Mean and Envelope
Author
Shubhra Prakash, shubhraprakash279@gmail.com
Examples
signal = sin(1:10)
extrema = c(1 , 2, 5, 8, 10)
local_mean_and_envelope(signal, extrema)
#> $mean
#> [1] 0.875384206 0.425285391 -0.024813424 -0.024813424 -0.004798219
#> [6] 0.015216986 0.015216986 0.118942777 0.222668568 0.222668568
#>
#> $ma
#> [1] 0.7253513 0.4252854 0.0877113 -0.0198096 -0.0047982 0.0102132
#> [7] 0.0411484 0.1189428 0.1967371 0.2226686
#>
#> $enve
#> [1] 0.03391322 0.48401204 0.93411085 0.93411085 0.95412606 0.97414126
#> [7] 0.97414126 0.87041547 0.76668968 0.76668968
#>
#> $enve_sm
#> [1] 0.1839462 0.4840120 0.8215861 0.9391147 0.9541261 0.9691375 0.9482098
#> [8] 0.8704155 0.7926211 0.7666897
#>