[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: weighted 2D histogram
From: |
Søren Hauberg |
Subject: |
Re: weighted 2D histogram |
Date: |
Sat, 19 Dec 2009 16:12:45 +0100 |
lør, 19 12 2009 kl. 13:11 +0100, skrev address@hidden:
> Now I need a weighted version of this such that each cell of the 2D-histogram
> is not just the amount of points in that cells area but the sum of all weights
> that come with the points that ly in that cell.
Essentially, the code you sent is merely a wrapper around 'histc'. It
seems that 'histc' does not support weights, so I don't think the
changes will be trivial. I think the 'histc' API could be extended to
support optional weights, but that would need some discussion.
Alternatively, you might be able to use that 'histc' can optionally
return the histogram indexes. From these you should be able figure out
which weights should be added together. I know this a vague description,
but it might get you in the right direction.
Søren