Code covered by the BSD License  

Highlights from
Interactive Smoothing

image thumbnail
from Interactive Smoothing by Tom O'Haver
Interactive smoothing for time-series signals

DemoSmooth3(n,h)
function DemoSmooth3(n,h)
% Re-draws graph when the Resample slider is moved
% Tom O'Haver, July 2006. Slider function by Matthew Jones.

global t
global SmoothSignal
global signal
global Noise
global NoiseArray
global puresignal
global wid
global SmoothWidth
global Passes

NoiseArray=Noise.*randn(size(t)); % Generate another random noise samplpe
% NoiseArray=Noise.*pinknoise(length(t)); % Generate pink noise
signal=.5+puresignal+NoiseArray; % Add noise to peak
DemoSmoothRedraw

Contact us at files@mathworks.com