Interpolation
Introduction
This module provides functions for interpolation of univariate functions using linear interpolation and cubic splines.
API
NumericalMethods.Interp.Linear
— TypeA callable linear interpolation object.
NumericalMethods.Interp.Linear
— Method(f::Linear)(x)
Evaluate the linear interpolation function at x
.
Arguments
f::Linear
: A callable linear interpolation object.x::Real
: The point at which to evaluate the interpolation function.
Returns
y::Real
: The value of the interpolation function atx
.
NumericalMethods.Interp.Spline
— TypeA callable cubic spline interpolation object.
NumericalMethods.Interp.Spline
— Method(f::Spline)(x)
Evaluate the cubic interpolation function at x
.
Arguments
f::Spline
: A callable cubic interpolation object.x::Real
: The point at which to evaluate the interpolation function.
Returns
y::Real
: The value of the interpolation function atx
.
NumericalMethods.Interp.cubic_interpolation
— Methodcubic_interpolation(x, y)
Construct a cubic interpolation function from the given points.
Arguments
x::Vector{<:Real}
: The x-coordinates of the points.y::Vector{<:Real}
: The y-coordinates of the points.
Returns
f::Spline
: A callable cubic interpolation object.
NumericalMethods.Interp.linear_interpolation
— Methodlinear_interpolation(x, y)
Construct a linear interpolation function from the given points.
Arguments
x::Vector{<:Real}
: The x-coordinates of the points.y::Vector{<:Real}
: The y-coordinates of the points.
Returns
f::Linear
: A callable linear interpolation object.