06-18-2010
08:06 AM
- last edited on
06-18-2010
10:26 AM
by
Laura F.
The easiest way I know to sort multiple arrays in the same fashion is to use an array clusters. Bundle the arrays element by element into a cluster, with the array you want to sort by as the first element. Sort this using Sort 1D Array, then overwrite your original data with the new, ordered, data (saves a data copy). You could sort the original arrays in-place, as well, but this would require knowledge of sorting algorithms. Here are two implementations of this algorithm. The first if for older versions of LabVIEW, the second for newer. Both attachments are LabVIEW 2009.
06-18-2010 10:30 AM - edited 06-18-2010 10:31 AM
It is not really a sorting problem, because we already have the sort key. All we need is to read the key out and rebuild the output.
Here's what I would do (Attached VI is downconverted from 2009 to LabVIEW 8.0, hopefully it still works ;)).
See if it makes sense.
06-18-2010 11:22 PM
Thanks people , i've found the solution.
I've used the same similar solution which altenbech gave.
It's working fine.