Interpolation

Introduction

This module provides functions for interpolation of univariate functions using linear interpolation and cubic splines.

API

NumericalMethods.Interp.LinearMethod
(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 at x.
source
NumericalMethods.Interp.SplineMethod
(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 at x.
source
NumericalMethods.Interp.cubic_interpolationMethod
cubic_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.
source
NumericalMethods.Interp.linear_interpolationMethod
linear_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.
source