To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI sorts an array of clusters by one of its cluster elements.
Description
This VI contains an array of clusters. The user can choose any element in the clusters in the "Element to Sort By" listbox. The clusters will be sorted according to that element.
Requirements
Steps to Implement or Execute Code
Additional Information or References
Front Panel
Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Hi could you help me, i seem i can't get it to go from the max to min instead of min to max and when i have 2 or more that are equal to each other i want them to be sorted by an other element of the cluster.
I would appreciate it if you could help me on that ( i have Labview 8.5)
Marc you're right. I discovered this VI will not work if any of the values are the same. For example change all Number 5s to "2000" and the resulting array will have two entries of one of the clusters and zero entries of the last cluster.
This is because the "search 1D array" function will return the index of the first matching value regardless of if there are other mathing values.
A better solution is presented here: