07-01-2010 08:21 AM
I'd like to sort an array and be able to use the sorted indices to sort another array (easy in Matlab).
I see there's an OpenG vi, but I was wondering if it can be done in standard LabVIEW.
Thanks!
07-01-2010 08:56 AM
Never mind ... I ended out writing my own vi to sort returning index and then sort using index (attached).
09-02-2011 08:37 AM
I know this topic is pretty old, but I stumbled here searching for a way to do the same thing as you. After trying out your VI, I just had an idea for a much simpler solution:
Bundle the indices with the values and sort an array of clusters. The sort function will sort according to the first item of the cluster, and your indices will stay associated with each value.
09-03-2011 12:21 PM
Sorting the array of clusters is what's done in the OpenG VI mentioned in the original post. I'm not sure why the posted didn't just use that VI as it's freely available and its source code is open.