[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] how to average a steam

From: Eric Blossom
Subject: Re: [Discuss-gnuradio] how to average a steam
Date: Thu, 22 May 2008 09:46:14 -0700
User-agent: Mutt/1.5.17 (2007-11-01)

On Thu, May 22, 2008 at 04:43:23PM +0200, Wolfgang Buesser wrote:
> Hi,
> what is the simplest way to caluclate the average of a stream?
> I generate a stream of fixed length using head(). I would like to
> calculate the linear average (i.e.
> sum_of_all_samples/number_of_samples).
> Thanks
>       Wolfgang

Depending on your exact needs, an IIR filter will do a reasonable job
of computing a running approximation to the average value of a stream.

See gr_single_pole_iir_filter_*


Absent a better idea, start with alpha == 0.001


reply via email to

[Prev in Thread] Current Thread [Next in Thread]