Not so tough.
This early in the morning it's easier to attach an example than frame an
articulate response. The example takes an array of data and an array of
upper bin boundaries and gives you an array of the average data value within
each bin. It needs tidying up- I didn't spend the time to comprehensively
test it (only ran it once) so there may also be bugs. You have to add a bit
of code to prevent the averaging of a zero length array at the start for
example. But it should be adequate to show how to do it.
I've just noticed the subject says you have a 2D array- this example is only
1D. The simplest would be to reshape your 2D array to become a long 1D array
before feeding it into this loop.
Documentation is left as an exercise for the student 😉
Cors
@no.email> wrote in message
news:506500000008000000E71F0000-991568043000@quiq.com...
> Hello all, I have a question that I've been fighting with for a while,
> I hope someone out there can help! Here's the deal, I need to perform
> something like a histogram, but not exactly. Instead of placing the
> number of occurrences a value is found within a data range in the bin,
> I need to place the actual value found in that range in the bin and
> then average all of those values in each bin together. If that isn't
> difficult enough, the values to determine the ranges are in a
> different array than where the values to place in the bin are located.
> (Basically I have an array to determine the ranges and another array
> that I use to grab the corresponding values in the ranges). I hope
> I'm clear enough, if not, give me a shout and I'll try and clear up
> any confusion I may have caused. Thankyou in advance!
>
> - Andrew DeBoer
> Computer Engineering Student
[Attachment FunnyB
inningExample.vi, see below]