Example Code

New 2D Array Sorter

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

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:

  1. LabVIEW 2012

 

Steps to Implement or Execute Code

  1. Unzip the attached folder to your computer
  2. Open the VI "Aes_Sorter 2012 NIVerified.vi"
  3. Run the program

 

Additional Information or References
NI Snippet

1.png

 **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.

Comments
essabar
Member
Member
on

Other exemple