LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ranking Random Numbers

I am trying to assign a random number to a constant value and then rank the assigned random number in ascending or descending order then use the ordered sequence of random numbers to execute a random run pattern for a multiple sequence case structure.

For example the constants would start with zero and continue trough ten in increments of 1. A random number needs to be associated with each constant and then the random numbers that are assigned placed in descending or ascending order. After that they are to be used to execute specific frames in a sequence case structure.
0 Kudos
Message 1 of 4
(2,912 Views)
If I understand you right, you want to simply shuffle an array of numbers in random order.

The attached example (LabVIEW 7.0) will do that for you.
(It is important to know that arrays of clusters are sorted by the first cluster element).

Message Edited by altenbach on 04-23-2005 11:28 AM

Message 2 of 4
(2,910 Views)
Edit : too late 😞

Message Edited by chilly charly on 04-23-2005 08:32 PM

Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
0 Kudos
Message 3 of 4
(2,904 Views)
Note that newer LabVIEW versions have the riffle function, which does the same in one step. 🙂
0 Kudos
Message 4 of 4
(2,535 Views)