MATLAB Answers

A question about scatteredInterpolant function

5 views (last 30 days)
Hello everyone,
I have a question about interpolating function scatteredInterpolant .
Assuming I have some scattered points; then I used scattered interpolant to having a 0.5x0.5 grid data from these.
Now I have data for each 0.5 x 0.5 grids (when ndgrids that I used in this process represents the center of each grid)
I want to know the value that interpolated at the center of each grid represents the average? or sum? of data for this 0.5x0.5 grid based on the values of my scattered data or just the value in the center of this 0.5x0.5 grid and not representative of a 0.5x0.5 grid ?
Please let me know if any more clarification required.
Thank you so much


Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 27 Apr 2020
Interpolation does not attempt to be "representative" in any way of the values.
You can choose from different interpolation methods. The default interpolation method triangulates the data, and then for each point that sampling is requested at, the method finds the vertices of the triangle that the point is within, and does linear interpolation of the values at the vertices based upon the distances to the vertices.
To emphasize: if you were in the middle of a huge peak in your data, but within that peak there was a very narrow deep pinprick, and you just happened to sample right within that pinprick, then the interpolation would not pay any attention to the values of the huge peak dominating that region, and would care only about the values at the vertices the point is at.


Walter Roberson
Walter Roberson on 27 Apr 2020
In some cases you might want to interpolate at a finer grid, and then resample to a less fine grid, such as by doing fft2() then ifft2() with a smaller number of output points, or by doing blockproc() to calculate the mean of blocks, or by using conv2() to calculate moving means but then extracting only some values from that.
Behzad Navidi
Behzad Navidi on 27 Apr 2020
Thank you again.
I asked this question because I want to use point to grid method in order to compare grid data values with point data values. The bases of this method is to interpolate points data to achieve grids.
I have the coordinate of the center of each grid of gridded data. Grids are in 0.5 x 0.5 degrees, so if the first center of a grid is 25 the second grid center is 25.5.
The grids values represent the average of precipitation in a 0.5 x 0.5 degrees (each grid value is average of precipitation in the grid area).
Now I have some points data that are scattered distributed. In order to perform comparison between the grid data and point data, I used scatteredInterpolant. And use ndgrid like gridded data.
So now I have original gridded data and interpolated data that are on each other. I am doing this but I'm still concerned if it's true or not.
In the papers, it was only mentioned that "you should interpolate your points to the gridded data resolution".
I would be grateful if you can tell me in this case (interpolate points to grids) scatteredInterpolant is useful or not.
Thank you again

Sign in to comment.

More Answers (0)




Translated by