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

Home » Public Forums » archive » Re: Where is the largest point ?
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: Where is the largest point ? [message #26140 is a reply to message #26138] Wed, 08 August 2001 13:13 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Hi,

Take a peek at the MAX function (check the online help)

maxVal = Max(Arrat, maxIndex)

maxVal will return the maximum value
maxIndex will return the index of the maximum value within the array.
If there is more than one value qualifying as MAX, then only the index
of the first maxVal encountered is returned in maxIndex.

Ben

Guillaume Dargaud wrote:
>
> I'm still pretty basic at IDL and a lot of the _no loop_ concepts escape me
> entirely (I'm too used to C and such).
> If I have a 2D matrix, how do I find where is the maximum ?
> Say:
>
> Mat=FltArr(NbX, NbY)
> ...
> [Xmax, YMax] = Where( Mat eq Max(Mat) )
>
> or something like that ?
> --
> Guillaume Dargaud
> Colorado State University - Dept of Atmospheric Science
> http://rome.atmos.colostate.edu/
> "If those folks in Kansas are right about evolution never having happened,
> I sure hope it happens soon." - Michael Sheinbaum.

--
Ben Tupper
Bigelow Laboratory for Ocean Sciences
180 McKown Point Rd.
W. Boothbay Harbor, ME 04575
btupper@bigelow.org
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Where is the largest point ?
Next Topic: Re: IDL virtual reality (was 3D Object IDL )

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

Current Time: Wed Oct 08 18:13:33 PDT 2025

Total time taken to generate the page: 0.00352 seconds