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

Home » Public Forums » archive » Re: A better way to find a dip (local minimum with certain conditions)
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: A better way to find a dip (local minimum with certain conditions) [message #69040 is a reply to message #69037] Wed, 16 December 2009 13:39 Go to previous messageGo to previous message
rogass is currently offline  rogass
Messages: 200
Registered: April 2008
Senior Member
Hi David,
as i understood the following might work (untested):

FUNCTION finddip,array,minim,range=range
range=keyword_set(range)? 0>range<n_elements(array) : 4
minimum = (min(array-minim,wheremin,/nan))[0] ; [0]-> to get only
the first match
if wheremin ne -1 then begin
ar = array[-1>(wheremin-range):(wheremin+range)<(n_elements
(array)-1)]
if max(((arr=ar[sort(ar)]-ar))) eq min(arr) then return,wheremin
endif else return,-1
end

Maybe it works and maybe that the principle behind gives you a hint
for solving the problem

Regards

CR
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: build project to executable .sav binary eclipse
Next Topic: Re: Place cursor programatically in draw widget?

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

Current Time: Sun Oct 12 17:06:35 PDT 2025

Total time taken to generate the page: 2.72122 seconds