Example Code

SubVI: How many elements in a numeric array equal a certain value?

Code and Documents

Attachment

Description

A handy little subVI!!! You supply it with an array of numerics, and a scaler numeric search value.

The subVI will then search the numeric array, and calculate how many instances of the specified search value are found within the array. The How Many subVI also calculates what percentage of the array elements are equal the search value.

How Many (FP).jpg

I have also supplied a “test environment”, which allows you to test drive the How Many subVI.

How Many (test enviroment).jpg

Requirements

LabVIEW 2009 or above

Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/

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

Contributors