07-15-2010 03:22 AM
HI, im trying to plot my graph in LabView and trying to do create a treadline of 50 period moving average like in excel.
is it possible for me to do it in LabView?
i have tried General Polynomial Fit VI and some other VIs in Fittings but cant get anything close to the way i want
any ideas? anyone?
Solved! Go to Solution.
07-15-2010 08:00 AM
Hi,
I've put together a running average example for you:
Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)
Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor
07-20-2010 03:03 AM
thanks for the help
i have change abit as i have to use the data i have in hand. apparantly, the data i have is in 2D array and it has 1 colume and 11000 row of data, that's how it is being arranged
but after i changed its not working properly
its like it is only taking the first row data only
any idea?
07-20-2010 06:22 PM
Use index array to separate each row, and doing moving average, and merge back later.
07-20-2010 08:07 PM
Charlie, There's a better VI called "Mean PtByPt". Look in the palette "Signal Processing >> Point by Point >> Prob & Stat >> Mean". One added benefit: this VI gives valid data for the first 50 points, even though the mean is not "fully developed" or "stabilized" during the first iterations. (Also, keep in mind that "Delete from Array" and "Build Array" primitives make a call to the memory manager, meaning memory copies for large arrays and fast loop rates will result in a CPU bottleneck. Using circular buffers is one way to mitigate this limitation.)
64864050, try adapting this code to fit your needs:
07-20-2010 10:35 PM
Thank you very much Jack Dunaway, it was a great help!
and i got the result i wanted.
Cheers!