Interpolation
Functions
LUSE_ENGR701_704_NumericalMethods.Interpolations.bezier — Method
bezier(x, y, xguides, yguides)An application of Hermitic polynomials to draw Bezier curves between points.
Notes
Each argument should be a one-to-one mapping of points, (xᵢ, yᵢ) and (xᵢ₊₁, yᵢ₊₁) and their respective guide points, (xᵢ⁺, yᵢ⁺) and (xᵢ₊₁⁻, yᵢ₊₁⁻).
sourceLUSE_ENGR701_704_NumericalMethods.Interpolations.clamped — Method
clamped(x, f, fp)The bookend polynomials will have the same slope entering and exiting the interval as the derivative at the respective endpoint.
sourceLUSE_ENGR701_704_NumericalMethods.Interpolations.lagrange — Method
lagrange(x, f[; n=nothing])Given a domain, x and range, f, construct the nth Lagrangian polynomial.
Notes
If n=nothing, then method will utilize entire dataset. Polynomials will quickly oscillate for larger datasets.
LUSE_ENGR701_704_NumericalMethods.Interpolations.linearinterpolation — Method
linearinterpolation(x, y, p)Calls linearinterpolation with the first index in x less than and greater than p. If for any p ∈ x, then the first occurrence in y is returned.
LUSE_ENGR701_704_NumericalMethods.Interpolations.linearleastsquares — Method
linearleastsquares(x, f, n::Int64)Construct a polynomial of degree, n while minimizing the least squares error.
Notes
Least squares error := $E = \sum_{i=1}^{m}[y_{i} - P_{n}(x_{i})]^{2}$
Constructed polynomial of the form: $P(x) = a_{n}x^{n} + a_{n - 1}x^{n - 1} + \dots + a_{1}x + a_{0}$
sourceLUSE_ENGR701_704_NumericalMethods.Interpolations.linearleastsquares — Method
linearleastsquares(x, f, type::Symbol)Given a domain and range, yield the coefficients for an equation and the equation of the form $y = ax^{b}$.
sourceLUSE_ENGR701_704_NumericalMethods.Interpolations.natural — Method
natural(x, f)The bookend polynomials do not assume the slope entering and exiting the interval as the derivative at the respective endpoint.
sourceLUSE_ENGR701_704_NumericalMethods.Interpolations.newtondifference — Method
newtondifference(x, f, α[; dir::Symbol=:auto])Given a domain, x and range, f, construct some polynomial by Newton's Divided Difference centered around α. :forward or :backward construction.
Notes
Direction will be chosen if not specified. Polynomials best made with even spacing in x; although, this is not completely necessary.
Index
LUSE_ENGR701_704_NumericalMethods.Interpolations.bezierLUSE_ENGR701_704_NumericalMethods.Interpolations.clampedLUSE_ENGR701_704_NumericalMethods.Interpolations.lagrangeLUSE_ENGR701_704_NumericalMethods.Interpolations.linearinterpolationLUSE_ENGR701_704_NumericalMethods.Interpolations.linearinterpolationLUSE_ENGR701_704_NumericalMethods.Interpolations.linearleastsquaresLUSE_ENGR701_704_NumericalMethods.Interpolations.linearleastsquaresLUSE_ENGR701_704_NumericalMethods.Interpolations.naturalLUSE_ENGR701_704_NumericalMethods.Interpolations.newtondifference