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

Home » Public Forums » archive » Re: Function Maximum
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: Function Maximum [message #35491 is a reply to message #35487] Thu, 19 June 2003 08:02 Go to previous messageGo to previous message
Benjamin Panter is currently offline  Benjamin Panter
Messages: 6
Registered: August 2002
Junior Member
Reimar Bauer wrote:
> Kate wrote:
>
>
>> If I have a function definition, say it is
>>
>> FUNCTION MYGAMMA, X, P
>> RETURN, P[0]*(X^P[1])*EXP(-1*X/P[2])
>> END
>>
>> Where P holds my fit parameters that are already determined.
>>
>> If I want to find a local maximum in a certain range is it possible to
>> do this with an existing written IDL function?
>
>
> What's with MAX()

<hopping out from lurking for a moment>

I think that Kate is asking to find the maximum of an expression rather
than the maximum of an array.

An inelegant solution that might work is to evaluate the funtion in the
range of interest to as high a precision as is computationally possible
- and then run MAX() on it - but there must be a nicer way? I think this
method will fall down if there is a very sharp global max but a wider
local max

Apologies for not being much of a mathematician and failing to provide a
better way!

<back to lurking & learning...>

Ben

--
Ben Panter, Edinburgh
My name (no spaces)@bigfoot which is a com.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: recording macros
Next Topic: Return of the GIF?

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

Current Time: Thu Oct 09 15:19:43 PDT 2025

Total time taken to generate the page: 0.01869 seconds