
Pedometer.
A step counter built from a smartphone's accelerometer. Walking data is recorded in MATLAB Mobile, the walking rhythm is isolated with a Fourier transform and a band-pass filter tuned to each walker's cadence, and peak detection counts the steps with 97.6% accuracy.
Reports
Highlights

Sampling.
Walks were recorded at 10 Hz in MATLAB Mobile, with the phone either in a trouser pocket or held flat against the body. Taking the norm of the three axes makes a step show up however the phone is held, and subtracting its mean removes gravity and centres the signal on zero.

Filtering.
A discrete Fourier transform finds the walking frequency as the tallest peak in the spectrum. A second-order Butterworth band-pass filter is then centred on it, with cut-offs scaled from each walk's own cadence rather than fixed, so the surrounding noise falls away.

Counting.
MATLAB's findpeaks counts a step at every filtered peak above a threshold set from the signal's standard deviation. Across six test walks of 17 to 60 steps, both carrying methods reached 97.6% accuracy. Taking the phone in and out of a pocket still registers as steps, and shorter, shuffling steps could fall under the threshold, so more walkers and longer walks are needed to prove it.
