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!
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With