Description Usage Arguments Details Value Examples
The drift is needed for interpolation by angular distance weighting extended by slopes. Interpolation weights include either all observations or are based on the nearest neighbors (4 to 10 neighbors, depending on the distance).
1 |
data |
A matrix of the points for which the function is known |
xinp |
Coordinates, where interpolation has to be computed |
weights |
Vector of the weights for the interpolation |
drift |
Matrix of the drift for the interpolation |
p |
Scalar, parameter for the weights, currently not used |
vparam |
Scalar, parameter for the slopes, currently not used |
The interpoliation works for a multidimensional input space and also for multi-responses.
The interpolated value(s) at xinp
1 2 3 4 5 6 7 8 9 10 11 | mydata <- matrix(runif(10*4)*10, ncol=4)
mydata <- cbind(mydata,abs(apply(mydata,1,sum)-3),abs(apply(mydata,1,prod)-4))
inp <- rep(4,4)
#Inverse distance weighting (based on all observations)
wintpl(data=mydata, xinp=inp, weights=di_get(data=mydata, xinp=inp,2))
#Inverse distance weighting (based on nearest neighbors)
wintpl(data=mydata, xinp=inp, weights=si_get(data=mydata, xinp=inp)^2)
#Angular distance weighting
wintpl(data=mydata, xinp=inp, weights=ti_get(data=mydata, xinp=inp))
#Angular distance weighting under consideration of slopes
wintpl(data=mydata, xinp=inp, weights=ti_get(data=mydata, xinp=inp), drift=slopezi_get(mydata,inp))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.