interpolate expects that your knot locations should be of the same dimension as the samples to be interpolated, but your X is a 1-dimensional vector, while V is a two-dimensional matrix. You can try this yourself with a 1-dimensional interpolation:
Note the use of itp.(xq) which uses Julia’s built-in broadcasting to compute itp(y) for each y in xq.
As for your 2d example, I’m sure there’s a way to get the output you’re looking for, but I’m having trouble figuring out what the intended behavior is from your code. What result are you expected from interpolating a 2D matrix V with a 1D vector of knots X?
The example I provided is taken from Matlab. I’m just checking if both functions will produce similar results. The expected output would be a 3D array of size (2,2,3).