comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » HIST_ND
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
HIST_ND [message #36193] Tue, 12 August 2003 09:32
Matthew Angling is currently offline  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
[Message index]
 
Read Message
Previous Topic: V6.0 indexing change
Next Topic: Astronomys` Sixth Neighbour Needs Help

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:07:42 PDT 2025

Total time taken to generate the page: 0.00405 seconds