LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Moving Average Filter

Solved!
Go to solution

sammir wrote:

Where can I find your proposed solution.. 


The one you already marked as the solution.  Here's a link to it:http://forums.ni.com/t5/LabVIEW/Moving-Average-Filter/m-p/2550589#M771776

 

You will need to add some logic to make the array size variable, but the basis is there.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 21 of 22
(3,789 Views)

@WillD  已寫:


This should work, although it is untested.  You can duplicate the Z-n blocks for more delay(sample size).  If you use powers of 2 for sample size you can use a bit shift to do the division and save space.  The average won't be valid for the first n samples.

 

VariableMean.png

 

Edit: Had the subtract inputs swapped.



This solution looks fantastic.

I am just wondering if the Z-n block outputs correct delayed sample each cycle.

If yes, it means Z-n block has internal array intrinsically.

Have you ever validated the delayed samples are correctly aligned?

0 Kudos
Message 22 of 22
(2,327 Views)