PEAK OF ENVELOPE – [ENVPEAK]
Outputs the peak value of the input (peak of envelope). The function displays output only if the next sample of the input is greater than or equal to the previous peak identified.
CATEGORY
Miscellaneous
DESCRIPTION
Outputs the peak value of the input (peak of the envelope). The function displays output only if the next sample of the input is greater than or equal to the previous peak identified.
RESULT VARIABLES AND PARAMETERS
Result | Peak value of the input |
Signal | Input |
SYNTAX
res=envpeak(input)
CHARACTERISTICS
Data type support
Double Floating point
EXAMPLE
Consider a sinusoidal signal with a periodicity of 16.67 ms (60 Hz) as input. Over a duration of 0.1 seconds, there will be 6 peaks. The function will have exactly 7 output points corresponding to 6 peaks and one for the first sample. That is because the function will detect only a positive peak and display only if the detected peak is either greater or equal to the previous peak value.
In the below example, though the output seems to be continuous, it is only because an inherent linear interpolation algorithm is used between two successive peaks. For the same reason, there is no output graph visible after the last peak (around 0.095 second).