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

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

[Octave-bug-tracker] [bug #45542] griddatan unable to perform 4-dimensio


From: Kai Torben Ohlhus
Subject: [Octave-bug-tracker] [bug #45542] griddatan unable to perform 4-dimensional interpolation.
Date: Tue, 18 Jun 2019 03:17:41 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.90 Safari/537.36

Update of bug #45542 (project octave):

                  Status:             In Progress => Patch Submitted        
                 Release:                   4.0.0 => 5.1.0                  
        Operating System:               GNU/Linux => Any                    

    _______________________________________________________

Follow-up Comment #3:

The patch of comment #1 (only three lines changed in file #34467) proved as
useful for bug #56515.  Here a proper diff with Octave code style
improvements:


diff -r f7bf27159cf7 scripts/geometry/griddatan.m
--- a/scripts/geometry/griddatan.m      Fri Jun 14 10:32:06 2019 -0500
+++ b/scripts/geometry/griddatan.m      Tue Jun 18 09:10:34 2019 +0200
@@ -81,7 +81,9 @@ function yi = griddatan (x, y, xi, metho
     yt = y(tri(tri_list,:));
 
     ## Use barycentric coordinate of point to calculate yi
-    yi(valid) = sum (y(tri(tri_list,:)) .* bary_list, 2);
+    if (! isempty (bary_list))
+      yi(valid) = sum (y(tri(tri_list,:))' .* bary_list, 2);
+    endif
 
   else
     error ("griddatan: unknown interpolation METHOD");


I can confirm, that this issue is still present in Octave 5.1.0 and works with
Matlab R2019a.

Thus I suggest to merge this patch to stable with a proper test credited to
you "Juho Iipponen <address@hidden>", if you agree.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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