Peak finding algorithm for essential signal processing. Returns peak amplitudes and locations. Various filters can be selected such as minimal absolute value, threshold above the immediate surroundings or predefined minimal spacing between the peaks.
It's a replacement for Matlab's proprietary 'findpeaks' function using the same syntax. Does not require any additional Matlab toolbox, just the base program.
MinPeakHeight, Threshold and MinPeakDistance parameters are accepted, just like in Matlab's original function. As of this moment, peak prominence is not implemented yet.
Accepths a bare 1D input array and optional position vector or sampling value.
The peak finding algorithm works by comparing each point to its immediate surroudings. A point (n) is considered to be a peak if it is strictly greater than its immediate neighbors (n-1) and (n+1).
Personal note: annoyingly enough, Matlab's own function requires a separate Signal Processing Toolbox. This function is too essential in my daily work. I consider it too basic to be charged extra. Therefore, I tried to write a decent intro version of my own.
引用格式
Kristupas Tikuišis (2024). peaks - 1D peak finding without Signal Processing Toolbox (https://www.mathworks.com/matlabcentral/fileexchange/127324-peaks-1d-peak-finding-without-signal-processing-toolbox), MATLAB Central File Exchange. 检索来源 .
MATLAB 版本兼容性
创建方式
R2020a
兼容任何版本
平台兼容性
Windows macOS Linux标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!