To download NI software, including the products shown below, visit ni.com/downloads.
This example will Remove Max and Min then Take average of the remaining Data whatever measurement data you are pulling.
I might think this will be useful to those who will find this code:
Made with LabVIEW 9.0
Description-Separate-2
vi Attached, Enjoy!!!!
How-Separate-2
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
@syrpimp wrote:How-Separate-2Related-Separate-1Related-Separate-2
1. No need for the Array Size to go into the FOR loop. The autoindexing tunnel will tell it how many times to iterate.
2. No need for the Search 1D Array. The Array Max & Min have outputs for the indexes of the max and min. So just build those into an array, sort, and then use the loop with just Delete From Array.
3. If all you actually care about is the average, then just add all of your values, subtract the max and min, and then divide by (array size - 2). No loops required then.
TAHNKS crossrulz , GREAT, kudos!
@syrpimp wrote:
Related-Separate-1
Related-Separate-2
With the second option, you need to sort and reverse the index array, otherwise you will delete the wrong value if the max came before the min.
I'd like to see some benchmarks, but I would guess that option 3 would be the most efficient since it does not involve messing with the potentially large array.
crossrulz You are GOAT, thank you for the Great idea. I learned from it.