LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to select the 5 most maximumst number and the 5 most minumumst number?

Dear All,
I draw a program. That is every loop the random number.vi create a number. I want to update the data in every loop to display the first 5 maximum number and the minumum.
I don't know how to do it. Could you please give me some suggestions.
Every reply is thankful.
My LabVIEW version is 7.1
Thanks!
 
 
Hugo
0 Kudos
Message 1 of 2
(2,121 Views)
Hi Hugo,

try those steps:
1) make a loop with 2 shift registers, initialized with arrays of 5 elements, set to 0.5 each
2) in the loop you append those two arrays containing 5 elements and the new random number (range 0...1)
3) sort the resulting 11 element array
4) take the first 5 for the 5 "smallest values" and the last 5 for "biggest values" and feed them into the corresponding shift register
5) next iteration!

Message Edited by GerdW on 08-13-2007 09:20 AM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 2
(2,121 Views)