Skip to content

AtsushiSakai/Interp1d.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interp1d

Stable Dev Build Status

A Julia package for univariate interpolations.

This package is inspired by scipy.interpolate.interp1d function.

Requirements

Julia 1.6.x or higher.

Install

If you want use latest development version,

using Pkg;Pkg.add(url = "https://github.com/AtsushiSakai/Interp1d.jl.git")

How to use

You can use many kind of univariate interpolations:

using Interp1d
using PyPlot
xi = collect(0.0:10.0) # x of interpolated points
yi = exp.(-xi./3.0) # y of interpolated points
x = collect(-1.0:0.1:11.0) # sampling points
for mode in INTERP_MODE_LIST # Do interpolations for all modes.
    f = interp(xi, yi, mode) # get an interpolation function
    y = f.(x) # Do interpolation
    plot(x, y, label=string(mode))
end
plot(xi, yi, "xr")
legend()

drawing

Details and other tips can be found in the latest documentaion:

Author