octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #57399] "griddata" result different from Matla


From: Hg200
Subject: [Octave-bug-tracker] [bug #57399] "griddata" result different from Matlab
Date: Thu, 31 Dec 2020 17:56:07 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0

Follow-up Comment #23, bug #57399 (project octave):

I have had a look at this again. The OP presented a data set where griddata
interpolates differently in Matlab than it does in Octave. The dataset being
interpolated is a function with superimposed noise. griddata does its
interpolation based on a Delaunay triangulation. A Delaunay triangulation is
not "unique", i.e. there can be different triangulations for a given problem
and so the triangulation between Octave and Matlab can be different too unless
not 100% the same code is used. Now, if a curve is not sufficiently smooth,
i.e. the grid points are not dense enough, then the interpolation to a
different Delaunay triangulation is different too.

Then there was bug #50494. In the end, Rik changed the Delaunay flags to fix
bug #50494. I have tested the problem again on the current development branch
and get the same results as already posted in comment #19. The left image
shows the region of interest as already examined in comment #13, and the right
image shows the difference between the Matlab interpolation that Markus
attached to this report and the interpolation that griddata creates on Octave.
I attached the script again because I didn't do that last time.

In the end there is still a difference between Octave and Matlab, because
otherwise the right image would show a flat plane. However, the difference is
the same magnitude as the "superimposed noise". Also all the dataset points
"touch" the interpolation curve (all red dots in the right picture are at
z=0). IMO, the griddata result in Octave is just as "bad" or "good" as the one
from Matlab. If you want more "equality", then the sample points have to be
chosen tighter.

Therefore I vote to close this report.


(file #50594)
    _______________________________________________________

Additional Item Attachment:

File name: comment19_tests.tar.gz         Size:141 KB
    <https://file.savannah.gnu.org/file/comment19_tests.tar.gz?file_id=50594>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57399>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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