Skip to content

nswa17/MyInterpolations.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyLinInterp.jl

julia code for interpolation

#usage

MyLinInterp : module

MyLinInterp.LinearInterpolation : (grid, vals) -> callable immutable object

MyLinInterp.LinearInterpolation(grid, vals) : x(of scalar, vector or matrix) -> value by interpolation(of scalar, vector or matrix)

#an example


include("MyLinInterp.jl")

grid = 1:10
vals = log(grid)

f = MyLinInterp.LinearInterpolation(grid, vals)

f(1.2)  # => 0.1386...

f([1.2, 1.3, 1.4])  # => [0.138629, 0.207944, 0.2772592]

f([1.5 2.5; 3.5 4.5]) # => [0.346574 0.89588; 1.24245 1.49787]

About

INTERPOLATION

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published