Julia: How to interpolate non-uniformly spaced 2-D data onto a grid?
<p>I have a series of data points that are scattered (non-uniformly) across a 2-dimensional grid. I want to interpolate those scattered data points onto a uniform grid. Is there a convenient built in function in Julia that will allow me to do this? Or how about an extra package that I can add (I have been looking at Interpolations.jl, Grid.jl, and GridInterpolations.jl, but I have no idea how to use them for this purpose)? I am looking for something similar to Matlab's <code>griddata</code>. Here is an example (with randomly chosen values) to demonstrate what I am looking for:</p>

<pre><code># x and y position of known data points
x = [ 1.5 , 8.8 , 2.9 , 7.2 , 7.1 , 3.8 , 8.4 , 2.1 , 0.8 , 5.1 , 7.5 ]
y = [ 6.1 , 9.3 , 5.2 , 7.7 , 9.8 , 7.7 , 8.5 , 6.4 , 5.8 , 9.0 , 8.7 ]

# value of known data points
val = [ 153.9 , 211.8 , 443.6 , 370.8 , 233.8 , 307.2 , 580.3 , 440.9 , 322.2 , 109.3 , 190.8 ]

# x and y positions to describe the interpolation grid
x_interp = [ 0.5 , 2.5 , 4.5 , 6.5 , 8.5 , 10.5 ]
y_interp = [ 1.0 , 2.0 , 3.0 , 4.0 , 5.0 , 6.0 , 7.0 , 8.0 , 9.0 ]

# Some function to interpolate the scattered data onto the grid
val_grid = SomeInterpolationFunction(x,y,val,x_interp,y_interp)
</code></pre>

<p>Is there a function in Julia that is capable of doing this?</p>