LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mean of Dynamic Data

Hi all,,
Here I am stuck at this point. In the attached snippet, I am acquiring data, then save it to an array of a constant size ( 5 elements) . After that, The array will be analyzed to keep the most closer values depends on the standard deviation. Now I need to get the mean value ( just only one mean value) of the final array , but in the current status it will return multiple mean for the same array ( depends on it's size). Please I need some hint to fix that.
Thank you

0 Kudos
Message 1 of 3
(2,747 Views)

M.A.A.M.

 

I'm having a hard time understanding what you mean by final array.  From what I could tell, you are adding a random number to the array if it is betwen 0.1 and 0.9 then clearing all elements once you reach an array size greater than 5.

 

I don't understand exactly what you are trying to do but my guess is you want to make use of some basic state machine or producer consumer where you gather inputs into groups of five then process the data once you have an array of five elements.

Matt J | National Instruments | CLA
0 Kudos
Message 2 of 3
(2,722 Views)

Hello Jacobson,

At first , thanks for response.

You are right,  I am adding a random number to an array if it is betwen 0.1 and 0.9 then clearing all elements if  the  array size is greater than 5. In fact , it's a simulation of  data acquisitin system, which may be not available for all members.

Regard to the objective of this Vi, what you guess is right, but in real condition sometimes the data deviate so much from the mean value and i should remove those nonrelevant data and put the relevant data to another array ( Final Data).  Now I need only one value from the Final array, this value will be the mean of this array. Hence, this array is dynamic, it will return multiple value of the mean, but I need only one value for each group.

 

0 Kudos
Message 3 of 3
(2,707 Views)