DSPRelated.com
Forums

Moving Average

Started by ashd...@rpi.edu October 16, 2007
Hi,

I am using the ADSP 21262 and want to apply a moving average to smooth
the readings I am aqcuiring from several sensors. Does anyone have any
source code examples of this? Any help would be greatly appreciated.

Thanks!
==============Original message text==============On Tue, 16 Oct 2007 0:13:21 EDT "miracle_sksim" wrote:

Hi,

I have search thru the net and went to some of the DSP forums. But
could not find any examples on digital filtering.

Is there anyone apply digital filtering effect on videos in blackfin
561 board ?

Well i need an example to start with. thanks.
===========End of original message text==========
On Tue, 16 Oct 2007 a...@rpi.edu wrote:

> Hi,
>
> I am using the ADSP 21262 and want to apply a moving average to smooth
> the readings I am aqcuiring from several sensors. Does anyone have any
> source code examples of this? Any help would be greatly appreciated.

The easiest way to do that is to use a circular buffer. Use one index
to keep track of where you are dumping new data and a different index in
the same dag to compute the average of all the data in the buffer.
Compute a new average every time you get new data, or as needed.

Patience, persistence, truth,
Dr. mike