HIST_ND [message #36193] |
Tue, 12 August 2003 09:32 |
Matthew Angling
Messages: 5 Registered: May 2002
|
Junior Member |
|
|
Hi!
I'm trying to increment some voxel values based on xyz tuples - a classic
use for a histogram. I'm trying to use JD's HIST_ND, but it's proving too
much for my feeble brain! So before I get into the misteries of reverse
indices, I've started to try to understand it by comparing output from
HIST_ND with RSI's HIST_2D as per the following 2d example. Why do the two
routines give different results?
IDL> ind1=[0,1,1,2]
IDL> ind2=[0,2,2,3]
IDL> print,hist_2d(ind1,ind2)
1 0 0
0 0 0
0 2 0
0 0 1
IDL> print,hist_nd(transpose([[ind1],[ind2]]),1)
1 0
0 0
0 3
What am I missing here?
Cheers
Matt
--
Dr. M. J. Angling
Centre for RF Propagation and Atmospheric Research
QinetiQ Malvern
email: mjangling@QinetiQ.com
|
|
|