LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

averaging lower percentile readings

I am trying to find the average of 10% of my readings( or the lower 10% of all my readings. Lets say I have the following readings, 1, 3, 86, 8, 99, 9, 4, 4, 3, 5, 7, 8, 9, 4, 67,90,34,89,90, 78, 89, 56, 144, 44, 55,etc. Let say I have 100 readings. How do I choose the ten lowest and find their average using labVIEW6.0?
0 Kudos
Message 1 of 9
(3,091 Views)
1/ Sort the data, using "Sort 1D Array" (Array subpalette)
2/ Use "Array subset" to get the N lowest elements. N can be calculated using "Array size", and dividing by the apparopriate number (10 in your cadse)
3/ Calculate the mean (Analyze>Matehmatics>Probabilty and statistics>Mean.vi)
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
Message 2 of 9
(3,088 Views)
"2/ Use "Array subset" to get the N lowest elements. N can be calculated using "Array size", and dividing by the apparopriate number (10 in your cadse)" I have got the array subset vi. How to get N lowest. Where is "array size". Let's say N=10 and the array size is 100. I am using labVIEW6.0. Do I right click and choose constant? or how? Any help would be apperciated.
0 Kudos
Message 3 of 9
(3,081 Views)

After the sort operation, the elements are ordered from lowest to highest. Accordingly, the N lowest elements are the N first elements. You just need to wire the length input since the index inpuit default to zero.

If you look with some attention into the array subpalette, you will found that the Array Size function is the very first :O.

Seems that you need to spend some time to get familiar with the most basic LabVIEW functions 😉

Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
Message 4 of 9
(3,073 Views)
I am also doing something similiar. I have attached a vi. Does this reflect the topic?
0 Kudos
Message 5 of 9
(3,042 Views)
I have attached a vi. Does it calculates the mean of the five lowest values?
0 Kudos
Message 6 of 9
(3,015 Views)
No. It takes the mean of all elements except for the lowest five. You want to specify an index of 0 and a length of 5. You've specified an index of 5 and no length. That does just the opposite and a simple test should have showed the error.
0 Kudos
Message 7 of 9
(3,011 Views)
I have attached a revised vi. Is that right?
0 Kudos
Message 8 of 9
(2,996 Views)
Yes. You could also just leave the index input unwired and it will automatically default to 0.
Message 9 of 9
(2,987 Views)