help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] spectrogram analysis ?


From: Alex Lopes
Subject: Re: [Help-gsl] spectrogram analysis ?
Date: Tue, 10 Aug 2010 13:34:40 -0300

At Sat, 16 Jan 2010 17:07:14 +0100,
wally wrote:
>* *
>* A spline interpolation and its derivative on this data works nice .*
>* I presume the integration will also work to find the areas, but i do*
>* not know how to get the zeropoints from the 1st derivative "*
>* gsl_spline_eval_deriv" results to determine the peaks.*
>* *
>* How to find the zero points ?  Is there a peakfinder on a dataset*
>* known ?  Is there an example sourcecode known which handle this*
>* problem ?*

Hi Wally,

I've done exactly this in Matlab. After you get the first derivative you can
do the following (in Matlab commented code) to find the maximum and minimum
points:
//fx1 is a vector with the y values of the spline derivative.
fx1(fx1>0)=1;
fx1(fx1<=0)=0;
extrema = find(diff(fx1)~=0); // it will detect where the first derivative
changes its signal. The accuracy depends on the fx1 range and length.

Now, I'm trying to translate this code to C using gsl. I need a little help
to compute the derivative. Could you send me a little piece of code showing
how to do it?

Thank you very much,
--
Alex Lopes Pereira


reply via email to

[Prev in Thread] Current Thread [Next in Thread]