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

Home » Public Forums » archive » Re: histogram and binsize problems
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: histogram and binsize problems [message #34239] Thu, 27 February 2003 13:12 Go to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Thu, 27 Feb 2003 09:52:33 -0700, Chad Bender wrote:

> Hi-
>
> I'm encountering some confusion using the histogram function when
> specifying the min, max, and binsize keywords. I looked at JD Smith's
> tutorial. But I couldn't find the answer to my question there, as all I
> really want is a plain old histogram, not some fancy array manipulation.

I think what you are after is in the tutorial, just up front in the
part people skip over:

NBINS
A relative of BINSIZE, NBINS is something of a misnomer. The
relation HISTOGRAM uses to compute the bin size if passed NBINS is:

BINSIZE=(MAX-MIN)/(NBINS-1)

and if NBINS is specified, MAX is changed to be (independent of
any value passed as MAX):

MAX=NBINS*BINSIZE+MIN

As such, it's probably better to avoid NBINS, if you care about
the MAX value staying put. A better relation which would leave MAX as
is and give you exactly NBINS bins between MIN and MAX:

BINSIZE=(MAX-MIN)/NBINS

Good luck,

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Is PDF the only help option in 5.6?
Next Topic: Matrix op speaks. Computer programmers needed to build matrix.

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

Current Time: Wed Oct 08 14:59:03 PDT 2025

Total time taken to generate the page: 0.00461 seconds