Example Code

Locate Multiple Minima Within a 2-D Array

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

Overview
This example program shows how to locate multiple minima within the array.


Description
The native array functions locating the minimum or maximum only report the indices of the first minimum element.  If there are multiple elements at the same minimum, those will not be reported.  This example program shows how we can locate multiple minima within the array. 


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Fill the Array with arbitrary numbers.
  2. Run the VI.
  3. Check the minimum values and their indices.

 

Additional Information or References
VI Block Diagram

 5-79.png

  **This document has been updated to meet the current required format for the NI Code Exchange.**

 

Cole R.
National Instruments
Software Engineer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.