3D Gridded Data Interpolation in Julia

Viewed 814

I'm strugling to convert some MATLAB code into Julia. I have some 3D gridded data (temperature that varies bi-dimensionally and over time) and want to change from a (x,y,t) mesh to a more loose (xi,yi,ti) mesh. In MATLAB it would be a simple interp(x,y,t,T,xi,yi,ti).

I tried using Interpolations, Dierckx, but both seemed to work only over 2D gridded data. Am I getting something wrong? I'm quite new in Julia programing...

I'm already considering the possibility of solving the problem via PyCall with some NumPy/SciPy funtion.

Thanks!

1 Answers

What led you to believe that Interpolations.jl works only for two-dimensional data?

julia> a = rand(1:100, 10, 10, 10);

julia> using Interpolations

julia> itp = interpolate(a, BSpline(Linear()));

julia> v = itp(1.4, 2.3, 3.7)
55.24
Related