nitin_809 Posted April 3, 2017 Report Share Posted April 3, 2017 Hi, The attached files has pressure data and around 180000 measured points. I want to make a VI to average of 50 data points and then next 50 data points and so on and create another file for taking all the average points calculated. How can i proceed on making this VI. Thanks in advance 20170306_DP04_Cyl_Pres-Updated-20170309.bin Quote Link to comment
smarlow Posted April 3, 2017 Report Share Posted April 3, 2017 There are lots of different ways to process the data in an array this way. One way is to reshape the data in the file, which is a 1D array of points, to a 2D array. The rows of the 2D array is auto-indexed using a FOR loop, and the points in each row averaged together, as show in the snippet I have attached. This code places the original points, and the averaged data into Waveform data for comparison in a waveform graph. I read your data in and it looks to be SGL data points. I also noticed that averaging 50 points severely degrades the features of your data, so you might want to use a smaller number. This code writes the averaged data back to a binary file that is the same type as the input. Also, if the number of points to average is not an even divisor of the number of points in the set, the data is truncated. Hope this helps. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.