ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Counting values in array

Solved!
Go to solution

Hi, I believe it is clear as sky but I can't manage to solve it.

I have an 2D array filled with random numbers. I need to create an 1D array representing the frequency of appearance of those numbers.

For example: my 2D array has number from 1 to 100, and I want to check how many times the number 25 appears. I need my 1D array to show this value under the index of 25.

Thanks a lot 🙂

0 Kudos
Message 1 of 3
(2,885 Views)
Solution
Accepted by topic author Oficmajster

You're looking for histogram functions in Mathematics->Prob&Stat pallete.

 

Oh, and Reshape Array from Programming->Array, to change your 2d array into 1d array 😉

0 Kudos
Message 2 of 3
(2,882 Views)

Thanks, it worked fine and dandy 🙂

0 Kudos
Message 3 of 3
(2,846 Views)