powered by
It interpolates y value when a corresponding x value (xnew) does not exist within x vector
gInterpol(x, y, xnew, Outer="NEAREST")
new x and y vector containing xnew and ynew point
vector values of x-axis, usually time
vector values of y-axis, usually concentration
new x point to be interpolated, usually new time point
indicates how to do the out of x range point
Kyun-Seop Bae <[email protected]>
This function interpolate y value, if xnew is not in x vector. If xnew is in the x vector, it just returns the given x and y vector. This function usually is called by gIntAUC function. Returned vector is sorted in the order of increasing x values.
gIntAUC
x = 1:10 + 0.1 y = -2*x + 40.2 gInterpol(x, y, 1.5) gInterpol(x, y, 0.5) # Out of range, Left gInterpol(x, y, 11) # Out of range, Right
Run the code above in your browser using DataLab