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

Home » Public Forums » archive » Re: Finding the index of the median
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: Finding the index of the median [message #7257 is a reply to message #7252] Tue, 29 October 1996 00:00 Go to previous messageGo to previous message
Joseph M Zawodny is currently offline  Joseph M Zawodny
Messages: 24
Registered: March 1996
Junior Member
Dean Schulze wrote:
>
> David Fanning wrote:
>
>> Be aware that there can be multiple locations in your
>> array that are equal to the median value. The index that
>> is returned by the WHERE function will be an array of
>> all of those values.
>
> That is exactly why the WHERE() function won't work.
> I need to know which one of those locations is returned
> by the MEDIAN() function.
>
> Dean Schulze
>

MEDIAN does not return an element or LOCATION, it returns a
VALUE which may be held by one or more elements.

Let's try this again: There may be more than one value which
equals the median value. Therefore the question you ask here
makes no sense at all without some additional information by
which to prioritize or otherwise sort those values which are
equal to the median. Having said that, you should use the
where function to find pointers to the median values and then
perform some other task or assessment on those values.

Maybe we would all understand your question better if you tell
us which element in the following arrays is your "median element"

[1,2,2,3]

[1,2,2,2,3]

One of the above arrays must have at least two "median elements"
by your definition. How will you choose?

Or am I just dense?

Z


--
Work: Dr. Joseph M. Zawodny Play: Joe Zawodny
NASA Langley Research Center KO4LW@amsat.org
E-mail: J.M.Zawodny@LaRC.NASA.gov zawodny@exis.net
(757) 864-2681 (757) 864-2671 FAX
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Is there a cheap implementation of IDL
Next Topic: Re: Correction: 2D FFt

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

Current Time: Fri Oct 10 08:32:46 PDT 2025

Total time taken to generate the page: 0.80440 seconds