diff scripts/geometry/griddata.m @ 28216:f5644ccd1df5

griddata.m, griddatan.m: Small tweak in input validation. * griddata.m: Only call tolower on METHOD input when it is required. * griddatan.m: Only call tolower on METHOD input when it is required. Add note to documentation that query values outside the convex hull will return NaN.
author Rik <rik@octave.org>
date Mon, 13 Apr 2020 18:19:41 -0700
parents 0e0e0de09f1e
children 90fea9cc9caa
line wrap: on
line diff
--- a/scripts/geometry/griddata.m	Mon Apr 13 18:10:45 2020 -0700
+++ b/scripts/geometry/griddata.m	Mon Apr 13 18:19:41 2020 -0700
@@ -129,8 +129,9 @@
         method = "linear";
       elseif (! ischar (method))
         error ("griddata: METHOD must be a string");
+      else
+        method = tolower (method);
       endif
-      method = tolower (method);
 
       if (any (strcmp (method, {"linear", "nearest", "v4"})))
         ## Do nothing, these are implemented methods