Some courses and learning paths on NI Learning Center may not appear on learner dashboards. Our team is actively investigating.

If you encounter access issues, please contact services@ni.com and include the learner’s name, email, service ID or EA number, and the list of required courses.

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,881 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,878 Views)

Thanks, it worked fine and dandy 🙂

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