interpolate(x,y,method)¶
Definition¶
String interpolate(Number x, Number y, String method)
Description¶
forward interpolation between the current data point (xi,yi) and its subsequent data point(xi+1,yi+1),(xi+2,yi+2)..., using the method specified, returns the coefficients of the line/curve(interpolant).
In the case of a linear interpolation, the function returns the intercept and slope of the interpolant.
Parameter Definition¶
Name | Type | Description |
---|---|---|
x | Number | the data to interpolate on the X-axis |
y | Number | the data to interpolate on the Y-axis |
method | String | the method used to interpolate the data, can be either linear or spline |