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

Home » Public Forums » archive » Re: Non-monotonic Abscissa values for IDL function SPLINE_P
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: Non-monotonic Abscissa values for IDL function SPLINE_P [message #66708 is a reply to message #66702] Wed, 03 June 2009 09:00 Go to previous messageGo to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
> nxr = n_elements(Xr)
> goodpoints = where(Xr ge max(total(identity(nxr),/cumul,2) * rebin
> (Xr,nxr,nxr), dimen=1))

Incidentally, if nxr is large, that code will run out of memory pretty
quickly and you're better off with an iterative solution like this:

goodpoints = lindgen(n_elements(Xr))
repeat begin
nowinc = where(Xr[goodpoints[1:*]] gt Xr[goodpoints], ninc,
ncomp=ndec)
if ninc gt 0 then goodpoints = [0,goodpoints[nowinc+1]]
endrep until ndec eq 0

-Jeremy.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: PNG IMAGE
Next Topic: creating buffers in IDL

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

Current Time: Sat Oct 11 06:06:18 PDT 2025

Total time taken to generate the page: 0.08071 seconds