Code covered by the BSD License
-
P=ipeak(DataMatrix,PeakD,AmpT...
Version 3.91, FitW now equals number of points, not number of intervals;
-
AmpTSlider(n,h)
Changes AmpThreshold when the AmpThreshold slider is moved.
-
BGSlider(n,h)
Called when the BG slider is clicked.
-
FitSlider(n,h)
Changes FitWidth when the FitWidth slider is moved.
-
P=findpeaks(x,y,SlopeThreshol...
function P=findpeaks(x,y,SlopeThreshold,AmpThreshold,smoothwidth,peakgroup)
-
P=findpeaks(x,y,SlopeThreshol...
function P=findpeaks(x,y,SlopeThreshold,AmpThreshold,smoothwidth,peakgroup,smoothtype)
-
P=findpeakslidersRedraw(x,y,S...
Redraws graph for FindPeakSliders when slider are moved.
-
PeakSlider(n,h)
Changes PeakNumber when the Peak slider is moved.
-
SlopeTSlider(n,h)
Changes SlopeThreshold when the SlopeThreshold slider is moved.
-
SmoothSlider(n,h)
Changes SmoothWidth when the SmoothWidth slider is moved.
-
V=findvalleys(x,y,SlopeThresh...
function P=findvalleys(x,y,SlopeThreshold,AmpThreshold,smoothwidth,peakgroup,smoothtype)
-
[index,closestval]=val2ind(x,...
Returns the index and the value of the element of vector x that is closest to val
-
d=deriv(a)
First derivative of vector using 2-point central difference.
-
d=secderiv(a)
Second derivative of vector using 3-point central difference.
-
exp(-((x-pos)./(0.6006.*wid))...
-
lorentzian(x,position,width)
-
rtslid(fig,f,hh,varargin)
RTSLID Slider widget that responds to dragging realtime
-
smoothwidth. Works well with ...
-
sy=condense(y,n)
Condense y by a factor of n, where n is a non-zero positive integer.
-
Demo4peaks.m
-
DemoFindPeak.m
-
DemoFindPeak.m
-
DemoFindPeakSliders.m
-
DemoFindPeakSliders2.m
-
DemoFindPeakSlidersG.m
-
FindPeakSliders.m
-
FindPeakSlidersG.m
-
RedrawPeak.m
-
TestPeakfind.m
-
ipeakdemo.m
-
ipeakdemo1.m
-
ipeakdemo2.m
-
ipeakdemo3.m
-
ipeakdemo4.m
-
View all files
from
Peak finding and measurement
by Tom O'Haver
Function to locate and measure the positive peaks and valleys in noisy data sets.
|
| smoothwidth. Works well with signals up to
|
function SmoothY=fastsmooth(Y,smoothwidth)
% fastsmooth(Y,w) smooths vector Y by triangular
% smooth of width = smoothwidth. Works well with signals up to
% 100,000 points in length and smooth widths up to 1000 points.
% Faster than tsmooth for smooth widths above 600 points.
% Example: fastsmooth([0 0 0 0 9 0 0 0 0],3) yields [0 0 1 2 3 2 1 0 0]
% T. C. O'Haver, 2006.
w=round(smoothwidth);
SumPoints=sum(Y(1:w));
s=zeros(size(Y));
halfw=round(w/2);
for k=1:length(Y)-w,
s(k+halfw-1)=SumPoints;
SumPoints=SumPoints-Y(k);
SumPoints=SumPoints+Y(k+w);
end
s=s./w;
SumPoints=sum(s(1:w));
SmoothY=zeros(size(s));
for k=1:length(s)-w,
SmoothY(k+halfw-1)=SumPoints;
SumPoints=SumPoints-s(k);
SumPoints=SumPoints+s(k+w);
end
SmoothY=SmoothY./w;
|
|
Contact us at files@mathworks.com