LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i sort out the N lowiest elements from an 1D array faster than using the build in sort function (1D-array) in Labview?

I need an algorithm that is based on the same sorting-algorithm that Labview uses (or one that is just as fast) but it only needs to sort out the N lowiest elements (and the N-element output array don't need to be sorted).

/Jonas
0 Kudos
Message 1 of 3
(2,642 Views)
What happens if some of the lowest elements are the same value? For example 3 of them might be zero, do you want only one zero in the output, or all three?
0 Kudos
Message 2 of 3
(2,642 Views)
I want all three zeros in the output. You can se the algorithm that I'm looking for as a soft version of Labviews own sort algorithm that only gives you the N (always less then the length of the array) lowiest values as output.If two elements contain the same small value both should be sorted out.

/Jonas
0 Kudos
Message 3 of 3
(2,642 Views)