I am attempting to do a second or third order interpolation on a grid of 2D data with 1D output; i.e. a scalar function on the complex plane. However, when attempting to do:

Interpolation[...,InterpolationOrder-> 2]

Mathematica gives the error: "Interpolation on unstructured grids is currently only supported for InterpolationOrder->1 or InterpolationOrder->All. Order will be reduced to 1."

There are multiple posts referencing this issue, one of which details that the documentation for the "Interpolation" function specifies a multi-dimensional data input of the form


(see Simon Wood's answer at Interpolation: Unstructured grid error). But my data is structured exactly in this fashion. My code is as follows:

    InterpolateK = {};
       InterpolateK, {{xlist[[iz]], ylist[[iz]]}, Klist[[iz]]}], {iz, 
    intK = Interpolation[InterpolateK, InterpolationOrder -> 2];

so the list "InterpolateK" has the form:


Another recommendation was to use "ListInterpolation", which unfortunately won't work because though regular, the grid of (x,y) values has some specific values omitted for convergence issues (x=y=0, x^2+y^2 = 1).

The reason for desiring a higher-order interpolation is to be able to take numerical derivatives up to second order of the interpolated function. With a linear interpolation, getting a second order derivative is impossible.

My questions are the following:

  1. What makes the list InterpolateK "unstructured"? It is in the format the documentation asks for and is as naturally ordered as it could be, save the omission of some points.
  2. How could the data be restructured to obtain a higher-order interpolation, or how could ListInterpolation be used on this data?

The hard part is that the function values come from a computationally intensive process and cannot be generated with a Table[...] as is used in some other examples. The raw data comes in the form of a set of (x,y) values with associated function values but no guarantee that they form a perfect grid.

EDIT:Below is a complete version of InterpolateK, as requested in comments:

  • $\begingroup$ Unstructured does not refer to the input format, but to the structure of the underlying mesh on which the available function values have been calculated. Can you share a full set of values for InterpolateK? You can add them to the question or share them on e.g. pastebin or some such. Also, take a look at the possible workaround presented in the documentation page for the error you are getting: reference.wolfram.com/language/ref/message/Interpolation/… $\endgroup$
    – MarcoB
    Jul 3, 2018 at 19:04
  • $\begingroup$ Added the full list to the question. Sounds like the omission of values is the irregularity referenced by the error message? I guess a possible workaround would be to compute an average and re-include the omitted points. $\endgroup$
    – hulsey
    Jul 3, 2018 at 20:19
  • $\begingroup$ Yes, that would work. I gave an example below. $\endgroup$
    – MarcoB
    Jul 3, 2018 at 20:40

1 Answer 1


You have missing points in your $(x,y)$ grid. With your complete definition of InterpolateK:

InterpolateK[[All, 1]] // ListPlot

Mathematica graphics

As you can see, and as you mentioned, the points {{-1, 0}, {0, 0}, {0, 1}, {0, -1}, {1, 0}} are missing in the grid, which makes it "unstructured". If you can add them back, either using limits or estimations, then you will get a second-order interpolation.

For instance, I arbitrarily set the value of the function at the missing values to $-2$:

full = 
  {{{-1, 0}, -2}, {{0, 0}, -2}, {{0, 1}, -2}, {{0, -1}, -2}, {{1, 0}, -2}}

Interpolation[full, InterpolationOrder -> 2]

Mathematica graphics


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.