No BSD License
-
P=findpeaks(x,y,SlopeThreshol...
Function to locate the positive peaks in a noisy x-y data
-
P=findpeaks(x,y,SlopeThreshol...
Function to locate the positive peaks in a noisy x-y data
-
P=findpeakslidersRedraw(x,y,S...
Redraws graph for FindPeakSliders when slider are moved.
-
P=ipf(x,y)
Interactive Peek Find function, P=ipf(x,y,WidthPoints),
-
RTSA6100__Plot_Spectrum
% 2007 Tektronix RTSA Demo program
-
[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))...
-
findpeakslider1(n,h)
Changes SlopeThreshold when the SlopeThreshold slider is moved.
-
findpeakslider2(n,h)
Changes AmpThreshold when the AmpThreshold slider is moved.
-
findpeakslider3(n,h)
Changes FitWidth when the FitWidth slider is moved.
-
findpeakslider4(n,h)
Changes SmoothWidth when the SmoothWidth slider is moved.
-
findpeakslider5(n,h)
Changes PeakNumber when the Peak slider is moved.
-
findpeakslider6(n,h)
Called when the BG slider is clicked.
-
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.
-
DemoFindPeak.m
-
DemoFindPeakSliders.m
-
DemoFindPeakSliders2.m
-
DemoFindPeakSlidersG.m
-
FindPeakSliders.m
-
FindPeakSlidersG.m
-
RedrawPeak.m
-
View all files
|
|
| 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 |
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