MATLAB: A question about scatteredInterpolant function

interpolationMATLAB

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.5×0.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.5×0.5 grid based on the values of my scattered data or just the value in the center of this 0.5×0.5 grid and not representative of a 0.5×0.5 grid ?
Please let me know if any more clarification required.
Thank you so much

Best Answer

  • 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.