peakdetect.m
Version 1.0.0.0 (1.73 KB) by
Tom McMurray
Generates and graphically displays the positive and negative polarity peak index vectors of input.
9.9K Downloads
Updated
1 Jun 2001
No License
peakdetect.m generates and graphically displays the positive and negative polarity (concave down and up) peak index vectors of an input signal vector. Positive and negative polarity peaks occur at points of positive to negative and negative to positive slope adjacency, respectively. The typically rare contingencies of peaks occurring at the lagging edges of constant intervals are supported.
Example:
[p,n]=peakdetect([-1 -1 0 1 0 1 0 -1 -1])
p =
4 6
n =
1 5 8
Cite As
Tom McMurray (2026). peakdetect.m (https://ch.mathworks.com/matlabcentral/fileexchange/72-peakdetect-m), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R12
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- Signal Processing > Signal Processing Toolbox > Measurements and Feature Extraction > Descriptive Statistics >
Find more on Descriptive Statistics in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
