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 _______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
