To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example shows how to sort a 2 Dimensional Array based on the values specified in one of the columns.
Description
This example shows how to sort a 2 Dimensional Array based on the values specified in one of the columns. The example sorts the rows in ascending order, but could be easily modified to descend instead. Essentially this behavior mimics the sort of sorting behavior you'd want in a spreadsheet.
The array can be resized but must remain 2 dimensional. The sorted contents are displayed in the array indicator on the right. This example works with any numeric array.
Requirements
Software:
Steps to Implement or Execute Code
Additional Information or References
NI Snippet
**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.
Other exemple