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

Home » Public Forums » archive » Re: Mode????
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: Mode???? [message #13991 is a reply to message #13988] Wed, 13 January 1999 00:00 Go to previous messageGo to previous message
rivers is currently offline  rivers
Messages: 228
Registered: March 1991
Senior Member
>> I am trying to find an IDL function that returns the mode out of
>> an array of numbers anyone know a way of doing this. It strange
>> that there does not seem to be a function for this.
>
> It would be (a lot!) easier to answer this question if you could
> explain what you mean by "returning the mode out of an array of
> numbers". But let me have one or two shots:
>
> If you mean the modulus of the numbers in an array, use the
> operator MOD, as in:
>
> answer = numbers mod 5 ;; Returns array "numbers" modulo 5
>
> If you mean the size of an array (mode out of an array, well
> could be..?) try the function size().

I bet he means the "mode", i.e. the value in the array with the most repeats.

I think the IDL "histogram" function is what one would use to get this
information.

Mark Rivers
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Routine_info bug in 5.2
Next Topic: Re: Problem with IDL output files

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

Current Time: Tue Oct 21 05:49:42 PDT 2025

Total time taken to generate the page: 1.91983 seconds