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

Home » Public Forums » archive » Re: MEDIAN and double?
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: MEDIAN and double? [message #30775 is a reply to message #30772] Fri, 17 May 2002 15:18 Go to previous messageGo to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
That's very strange. It appears that MEDIAN always returns a floating point
value, even if the input array is integer. I suspect this is because of the
/EVEN keyword, where it interpolates between two values if the number of points
is even. It should be smarter than that.

William Thompson


"Pavel A. Romashkin" <pavel_romashkin@hotmail.com> writes:

> I always thought that MEDIAN in Double is just

> print, (the_data[sort(the_data)])[n_elements(the_data)/2]

> but I may be wrong.
> Cheers,
> Pavel

> Craig Markwardt wrote:
>>
>> Is it true that MEDIAN only works in single precision? I've tried to
>> use a /DOUBLE keyword and it doesn't have one. This is kind of a
>> stumper since I certainly do use MEDIAN on double precision
>> data... :-)
>>
>> Craig
>>
>> --
>> ------------------------------------------------------------ --------------
>> Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
>> Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
>> ------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: sample mean and parametric mean?
Next Topic: Seg. Fault in IDL 5.5 (Linux)

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

Current Time: Thu Oct 09 22:59:47 PDT 2025

Total time taken to generate the page: 0.45504 seconds