Code covered by the BSD License
-
DemoSmooth1(n,h)
Re-draws graph when smooth width slider is moved
-
DemoSmooth2(n,h)
Re-draws graph when number of passes slider is moved
-
DemoSmooth3(n,h)
Re-draws graph when the Resample slider is moved
-
SmoothSlider1(n,h)
Re-draws graph when smooth width slider is moved
-
SmoothSlider2(n,h)
Re-draws graph when smooth passes slider is moved
-
[PeakX, PeakY, Width]=PeakEst...
Least-squares estimate of peak height, position, and width of a Gaussian
-
exp(-((x-pos)./(0.6006.*wid))...
-
rtslid(fig,f,hh,varargin)
RTSLID Slider widget that responds to dragging realtime
-
s=bsmooth(a,w)
% Convolution...
-
s=bsmooth2(a,w)
% bsmooth(a,...
-
s=gsmooth(a,w)
% smooth(a,v) ...
-
s=tsmooth(Y,w)
% tsmooth(Y,w...
-
s=tsmooth2(Y,w)
% tsmooth(Y,...
-
smoothwidth. Faster than
% c...
-
smoothwidth. Works well with ...
-
DemoSmoothRedraw.m
-
DemoSmoothRedraw2.m
-
DemoSmoothSlider.m
-
DemoSmoothSlider2.m
-
SmoothSlider.m
-
SmoothSliderRedraw.m
-
SmoothSliderTest.m
-
View all files
from
Interactive Smoothing
by Tom O'Haver
Interactive smoothing for time-series signals
|
| s=tsmooth2(Y,w)
% tsmooth(Y,w) smooths vector Y by a triangular function of halfwidth w
% T. C. O'Haver, 1988.
v=ones(1,w);
v=conv(v,v);
S=conv(Y,v);
startpoint=(length(v) + 1)/2;
endpoint=length(Y)+startpoint-1;
s=S(startpoint:endpoint) ./ sum(v);
L=le |
function s=tsmooth2(Y,w)
% tsmooth(Y,w) smooths vector Y by a triangular function of halfwidth w
% T. C. O'Haver, 1988.
v=ones(1,w);
v=conv(v,v);
S=conv(Y,v);
startpoint=(length(v) + 1)/2;
endpoint=length(Y)+startpoint-1;
s=S(startpoint:endpoint) ./ sum(v);
L=length(Y);
s(1)=(Y(1)+Y(2))./2;
for k=2:startpoint-1,
s(k)=mean(Y(1:(2*k-1)));
s(L-k+1)=mean(Y(L-2*k+2:L));
end
s(L)=(Y(L)+Y(L-1))./2;
|
|
Contact us at files@mathworks.com