interpol1d {OptHedging} | R Documentation |
Interpolates linearly a function given at equally spaced points on the interval [minS,maxS].
interpol1d(x,F0,minS,maxS)
x |
Point at which the function is interpolated. |
minS |
Minimum value of the grid. |
maxS |
Maximum value of the grid. |
F0 |
Value of the function at m equally spaced points on the grid. |
interpol |
Linear interpolation of the function at point x. |
Bruno Remillard
Chapter 3 of 'Statistical Methods for Financial Engineering, B. Remillard, CRC Press, (2013).
F0 = c(1:10) minS = 1; maxS = 10; out = interpol1d(2.45,F0,1,10) out #since the function is the identity, the answer should be 2.45!