relative maxima and minima of an array


katto01
09-12-2006, 03:27 PM
Hello,

I am looking for a routine (that I can build using NR) that calculates the relative maxima and minima of a series.
For example, for a sampled sinc function, I need to calculate the values of the peaks and their locations, as well as the values of the nulls and their locations.
I wrote a routine like that, using descrete derivatives, but it does not work in some cases. I think I missed something.

Thanks

Katto01