MATLAB: Interpn griddata difference

interpolation

Hi,
What are the differences between interpn and griddata?
Thank you.

Best Answer

The interpn function requires input data on a plaid grid, i.e. as you would produce with meshgrid, or perhaps ndgrid, while griddata (and scatteredInterpolant and TriScatteredInterp) expects input data on irregular grids. GRIDDATA expects the inputs as 1-D vectors. See the help and documentation for the respective functions, there you should find "minimal" illustrating examples to look at.
HTH