Quote:
Originally Posted by Joe Ross
I've attached a version that does what I think you want. The main thing you needed was a shift register (or feedback node) to take your changed array and feed it back so it could be operated on. The way you had it, each loop it was always operating on the original array. I must admit that this has been the thing I've messed up the most in LabVIEW.
You'll need another loop of some type to finish sorting. You can also use the array size VI for the input to the count terminal input of the for loop.
|
Taking Mr. Ross' vi a bit further, I've modified it to swap array elements without overwriting the ith array element. Still needs another loop to control the number of passes through the array in order to propagate all of the changes each pass makes.