LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to find average that becomes more stable with time with continuous sampling

I am trying to find a good way to get a good average of a constantly increasing amount of data. I have tried the Point by Point vi which seems like it should do the job, but whenever I initialize it, the value drops down to about half of what it should be. Any suggestions?

0 Kudos
Message 1 of 5
(2,794 Views)

Your description of what you want to do is not completely clear.

 

Let me try a little example. When you have acquired the first 5 points, you want the average of those 5 points. Later, when you have acquired 100 points you want the average to include all 100 points. If this is what you want, one easy way to do it is to use two shift registers.  One keeps the previous average and the other keeps the total number of points.  When you get new data you calculate the new average =[ (old average)*(old point count) + new point(s) ]/[old point count + number of new points].  

 

If you want something else, please specify the algorithm to calculate wht you want.

 

Lynn

0 Kudos
Message 2 of 5
(2,783 Views)

Is there any way you could save that vi so that i could open it in Labview 8.6?

0 Kudos
Message 4 of 5
(2,702 Views)

This should do it.

Philip
CLD
0 Kudos
Message 5 of 5
(2,694 Views)