|
From: Levente <ln...@dr...> - 2007-10-24 13:00:56
|
On Wed, 2007-10-24 at 14:45 +0200, pl...@pi... wrote: > On Wed, 24 Oct 2007 13:43:22 +0200, Levente Nov=C3=A1k =20 > <ln...@dr...> wrote: > > First of all, thanks to everybody who helped me! I succeeded in > > approximating the differential of data files the following way, using > > J=C3=BCrgen's example: > > > > # Approximation of the first derivative of x-y data > > # by the method: (y(n)-y(n-1))/(x(n)-x(n-1)) > > > > old_x =3D NaN > > old_y =3D NaN > > plot 'something.dat' using 1:(dx=3D$1-old_x,dy=3D$2-old_y,old_x=3D$1,ol= d_y=3D > > $2,dy/dx) > > > > Just to let know to whom it may be useful. Maybe a small demo file coul= d > > be written to demonstrate its use (I am pleased to post such a demo if > > this is OK). > > > Glad you found this feature useful. >=20 > It's quite new so it needs some different uses to see if does all that's = =20 > needed, thanks. >=20 > if you want to post that as an example it should probably by plotting =20 > against ($1+old_x)/2 to prevent a shift in the position of the derivative= . >=20 You are absolutely right, the x values need to be corrected (only I had so many datapoints that this shift was very small in my initial example). I will adapt the formula accordingly. Levente |