linear_interpolation: Linear interpolation

View source: R/linear_interpolation.R

linear_interpolationR Documentation

Linear interpolation

Description

The linear interpolation function, interpolate value of the function at point x.

Usage

linear_interpolation(x, x1, x2, y1, y2)

Arguments

x

numeric value, argument in the searched function value.

x1

numeric value, argument of the function x1 <= x.

x2

numeric value, actual argument of the function x <= x2.

y1

numeric value, the value of the function at the point x1.

y2

numeric value, the value of the function at the point x2.

Value

A numeric value, interpolated value of the function at the point x.

Examples

linear_interpolation(3, 2, 3.5, 5, 7)


mociepa/ShortfallRiskHedging documentation built on Sept. 30, 2022, 6:43 p.m.