This functions returns the derivative of the curve whose XY coordinates denoted by vector vx and vy. No smoothing is performed in this function. Derivative is computed by taking the average slopes from the previous and next two data points except at the ends where only one slope is used. This algorithm is applied recursively for each order n.
vector DerivativeXY(vector vx, vector vy[, int n])
Return the nth order of derivatives of specified curve (vx, vy).
The following example calculates the first derivative from sample data HiddenPeaks.dat and creates a stacked line plot.
string fn$ = system.path.program$ + "Samples\Spectroscopy\HiddenPeaks.dat";
col(3)[L]$ = "1st Deriv";
plotstack iy:=(1,2:3) plottype:=line link:=1 xlink:=1;
range l1 = 1!;
l1.x.from = 0;
l1.x.to = 10;