[Top][All Lists]

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

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

From: wolfgang buesser
Subject: Re: [Discuss-gnuradio] how to average a steam
Date: Thu, 22 May 2008 10:38:23 -0700 (PDT)

Eric Blossom wrote:
> 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_*
> http://gnuradio.org/doc/doxygen/classgr__single__pole__avg__filter__ff.html
> http://gnuradio.org/doc/doxygen/classgr__single__pole__iir__filter__cc.html
> Absent a better idea, start with alpha == 0.001
> Eric
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


I would prefer to have the same weight for all samples. So I guess
I am looking for an FIR with N-taps 1/N each, collapsing the whole stream
to just a single value. But I guess really setting up this filter and
picking out the
last output-value would be a rather inefficient way of performing the task.

View this message in context: 
Sent from the GnuRadio mailing list archive at Nabble.com.

reply via email to

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