MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a test rig which at short intervals samples the current drawn by a WiFi chip beaconing and sleeping between each beacon. The result is a good approximation to a square wave, with slight spiky irregularities or "whiskers" at the boundaries, but broadly speaking a series of plateaus (plateaux?!) of equal height.

I would like a simple numeric method to extract from the data the best fit "idealized" characteristics, mainly the average plateau height and width and sleeping gap between steps. I suppose deducing the period would be most of what is needed for a start.

This problem is probably only borderline on-topic here, if that, being near the interface of maths and computer algorithms. Also it is obvious up to a point how one might proceed, by dexterous use of averages. But there may be other situations where the wave form is not so simple, for example a sloping line instead of a plateau.

So I wondered if there might be a simple but more effective and robust approach than fiddling around with averages. although I probably wouldn't want anything too sophisticated such as Fast Fourier Transforms (if those might be appropriate). But I am open to and interested in any suggestions. So now's your chance to solve a real industrial problem ;-)

share|cite|improve this question
Probably or is a better place to ask question of that kind. – Piotr Migdal Mar 24 '12 at 10:45
The question is a bit vague. Can you be a little bit more specific as to what exactly you are looking for? – fedja Mar 24 '12 at 12:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.