help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interpolating over a non-monotonic mesh


From: Brett Green
Subject: Re: Interpolating over a non-monotonic mesh
Date: Thu, 4 Jun 2020 14:46:35 -0400

Thank you to both Nicklas and Michael - it took me a while to get around to this, do some coding, and do some troubleshooting, but I'm back now.

On Fri, May 29, 2020 at 4:19 PM N <nicklas.karlsson17@gmail.com> wrote:

Had or still have close the same problem but it also have some random variations for grid position. griddata(...) I think interpolate from the four neareast neighbours feels like a good solution also for a scewed mesh. Generate tringulation with dealunay(...) function is another option I used there I got a slightly modified version of function for inerpolation on this mesh from someone here I can't remember the name of. There also other statistical methods there kriging might be a good option.

Nicklas SB Karlsson

Thank you! I am looking for something fast. I like the kriging idea and may try that later. griddata was O.K. but still slow, so I decided to try Michael's suggestion, which takes advantage to the regular mesh to run faster code.

On Sat, May 30, 2020 at 12:30 AM michaell <michael.leitner@frm2.tum.de> wrote:

Do a basis change so that your grid is orthogonal (probably that's what you
mean by "monotonic"), interpolate via interpn by the method of your choice
there, and evaluate at the equally transformed probe points. Of course, in
this way you will have anisotropy in your interpolated results -- e.g., if
you use nearest-neighbour interpolation, you will get parallelogram facets.
But in any case that can't be avoided: you didn't specify which method you
want to use for interpolation -- if your data points were on a regular
triangular lattice, barycentric interpolation would be natural, which would
give you isotropic results, but your data points aren't.

Thank you for the suggestion - I'd thought about it before but was too concerned with distorting the interpolation with the basis change, but in the end I think this is the best strategy to try first. I should at least try it and check how much error that introduces before making a decision.

Unfortunately, I'm now having problems with NA values being returned by interp2. I'll write that in a separate question, though, because it's not directly related to the shape of the mesh which was the subject of this message.
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]