i have a attached a Vi with a 2d array of integers. What im struggling to do is to count the occurence of numbers in the array and then then histogram this. For example if there were 10 occurences of the number 16 then the histogram will show 16 along the X axis and 10 on the Y axis.
i need to do this for every number on the array and plot the reuslts on one single array.
Any help would be great. i have looked on some of the examples but they are all dealing wioth 1d arrays.
try to understand this:
I'm aware of ReshapeArray, but my approach demonstrates the basic LabVIEW elements of autoindexing arrays and shift register usage. That's the main point I want to teach the OP! 😉
No trouble at all Gerd. I figured you had a reason to avoid the built-in function.
Just to throw in another solution (specific to this problem; modifications needed if bin size changes). I like this trick of counting the number of elements equal to a number in an array. It may not be most efficient, but it's clean and I use it quite often so it's a good one to know.