Reputation: 21
I want to use interp2 function of MATLAB in Julia.
I tried GR module but I failed.
Now I'm using julia 0.64 version
Hope you guys can help me
Upvotes: 0
Views: 772
Reputation: 1905
Have a look at Interpolations.jl. This example is equivalent to the interp2
function:
A = rand(8,20)
knots = ([x^2 for x = 1:8], [0.2y for y = 1:20])
itp = interpolate(knots, A, Gridded(Linear()))
itp(4,1.2) # approximately A[2,6]
http://juliamath.github.io/Interpolations.jl/latest/control/#Gridded-interpolation-1
Upvotes: 3
Reputation: 1422
You might find the Dierckx.jl package helpful to achieve 2-d spline fitting. See for instance Spline2D
.
Upvotes: -1