# HG changeset patch # User Rik # Date 1586793373 25200 # Node ID bb50407f9c60bc4a835914c0814218586cc08657 # Parent d052c11d47c6289d1d809527562dc286f9a8f1ca griddatan.m: Issue informational error if "cubic" METHOD is used. * griddatan.m: Issue error that "cubic" method is not yet implemented. Adjust BIST tests for new behavior. diff -r d052c11d47c6 -r bb50407f9c60 scripts/geometry/griddatan.m --- a/scripts/geometry/griddatan.m Sun Mar 29 22:15:32 2020 +0200 +++ b/scripts/geometry/griddatan.m Mon Apr 13 08:56:13 2020 -0700 @@ -108,12 +108,12 @@ method = tolower (method); if (strcmp (method, "linear") || strcmp (method, "nearest")) ## Do nothing, these are implemented methods - elseif (any (strcmp (method, {"cubic", "v4"}))) + elseif (strcmp (method, "v4")) error ('griddatan: "%s" METHOD is available for 2-D inputs by using "griddata"', method); - elseif (strcmp (method, "natural")) - ## FIXME: Remove when griddata.m supports "natural" method. - error ('griddatan: "natural" interpolation METHOD not yet implemented'); + elseif (any (strcmp (method, {"cubic", "natural"}))) + ## FIXME: Remove when griddata.m supports these methods. + error ('griddatan: "%s" interpolation METHOD not yet implemented', method); else error ('griddatan: unknown interpolation METHOD: "%s"', method); @@ -191,6 +191,6 @@ %!error griddatan ([1;2],[3;4], [1, 2]) %!error griddatan ([1;2],[3;4], 1, 5) %!error <"v4" METHOD is available for 2-D> griddatan ([1;2],[3;4], 1, "v4") -%!error <"cubic" METHOD is available> griddatan ([1;2],[3;4], 1, "cubic") +%!error <"cubic" .* not yet implemented> griddatan ([1;2],[3;4], 1, "cubic") %!error <"natural" .* not yet implemented> griddatan ([1;2],[3;4], 1, "natural") %!error griddatan ([1;2],[3;4], 1, "foobar")