detect the Peak or valley in a 1 D signal
%To detect the Peak or valley in a 1 D signal
% input: y signal ;n*1
% T threshold of D-value ,which is difference between the peak value
% or valley value and bilateral value
% d the distance of bilateral value
% p_v parameter for peak or valley ;p_v=0 all;pv=1,peak only;others
% valley only
% example [x1 x2 x3 x4 x5] d=2; T=0.5; When (x1+x5)-2x3>T ,the x3 will be
% decided as a valley
% output: ind the index of peak or valley
Cite As
pang jianfei (2024). detect the Peak or valley in a 1 D signal (https://www.mathworks.com/matlabcentral/fileexchange/41262-detect-the-peak-or-valley-in-a-1-d-signal), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Signal Processing > Signal Processing Toolbox > Measurements and Feature Extraction > Descriptive Statistics >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.