Keywords

interpolation, cubic spline, PCHIP, Julia, irregular grid, hermite

Abstract

This article shows how to interpolate between regularly- or irregularly-spaced points in Julia 1.0. It has derivations of the theory behind cubic splines, and piece-wise cubic hermite polynomial interpolation. The spline interpolants are continuous and have continuous first and second derivatives. The hermite polynomial interpolants are continuous and have continuous first derivatives. Three techniques are implemented to determine the slope at the data points for the interpolation (knots). One uses the average slope of the neighboring segments. Another use the quadratic polynomial passing through the point and its two neighbors. The third, PCHIP, is similar to the first method, but it adjust the slopes where necessary to avoid oscillations in the interpolant near jumps in the data points.

Document Type

Peer-Reviewed Article

Publication Date

2018-08-23

Language

English

College

Physical and Mathematical Sciences

Department

Physics and Astronomy

University Standing at Time of Publication

Full Professor

Included in

Physics Commons

Share

COinS