Finding local maxima's and minima's of a curve
%output = fpeak(x,y,s,range)
% x and y are the data
% s: is a scallar and determines the sensitivity of the function, the
% default (minimum) value is 1.
% Range: is the interval to find local maxima and minima and is
% optional, it has four elements: [x_min x_max y_min y_max]
% output: is the xy position of local maxima's and minima's
% SEE ALSO findpeaks
%-----------------------------------------------------------------------
% Author: Geng Jun, Dec 09, 2003
% Email: dr.gengjun@126.com
% Editted by: Farhad VISHKAEE, 23 May, 2010
% Email: f.vishkaee@gmail.com
% LinkedIn: http://www.linkedin.com/pub/farhad-vishkaee/33/191/40a
%-----------------------------------------------------------------------
Cite As
Farhad VISHKAEE (2025). Finding local maxima's and minima's of a curve (https://www.mathworks.com/matlabcentral/fileexchange/41205-finding-local-maxima-s-and-minima-s-of-a-curve), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
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.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |