I am looking for a function in Matlab that constructs a cubic interpolation function, Z = f(X, Y)
, for irregularly spaced data. Basically, Matlab's griddedInterpolant
function is what I'm looking for in terms of interpolation Method
, whereas I'm looking for Matlab's scatteredInterpolant
in terms of the regularity requirements of the input data. Namely, scatteredInterpolant
only offers nearest
, linear
, and natural
interpolation Methods
.
I require cubic interpolation, because I use this function in a program that requires twice continuously differentiable functions. So, makima
or pchip
as interpolation methods would suffice, too, though I prefer cubic
.
I did find this function on Matlab FEX, but with its poor documentation I'm not exactly sure if this is what I'm looking for. Moreover, it says it's more computationally expensive than griddedInterpolant
and scatteredInterpolant
, which doesn't really fit my needs.
Moreover, cubic interpolation to map the data onto a regularly spaced 3D grid and subsequently calling griddedInterpolant
isn't a possibility for me.