# HG changeset patch # User John W. Eaton # Date 1418051754 18000 # Node ID 1572b5276b9a64b0af9b8250703d76678873720e # Parent c1ce43276b8616108a8eefe0eec599fc6cc8de54# Parent 616f2b22787b35ccf39699763285e4383f14d4db maint: Periodic merge of stable to gui-release. diff -r c1ce43276b86 -r 1572b5276b9a libinterp/corefcn/load-save.cc --- a/libinterp/corefcn/load-save.cc Thu Dec 04 16:06:31 2014 -0500 +++ b/libinterp/corefcn/load-save.cc Mon Dec 08 10:15:54 2014 -0500 @@ -895,6 +895,11 @@ orig_fname.c_str ()); } } + else + { + error ("load: unable to determine file format of '%s'", + orig_fname.c_str ()); + } } return retval; diff -r c1ce43276b86 -r 1572b5276b9a scripts/general/interp1.m --- a/scripts/general/interp1.m Thu Dec 04 16:06:31 2014 -0500 +++ b/scripts/general/interp1.m Mon Dec 08 10:15:54 2014 -0500 @@ -329,6 +329,7 @@ minx = min (x(1), x(nx)); maxx = max (x(1), x(nx)); + xi = reshape (xi, szx); outliers = xi < minx | ! (xi <= maxx); # this even catches NaNs if (size_equal (outliers, yi)) yi(outliers) = extrap; @@ -338,6 +339,7 @@ else yi(outliers.') = extrap; endif + endif endfunction @@ -612,6 +614,8 @@ ## test extrapolation (linear) %!assert (interp1 ([1:5],[3:2:11],[0,6],"linear","extrap"), [1, 13], eps) %!assert (interp1 (xp, yp, [-1, max(xp)+1],"linear",5), [5, 5]) +%!assert (interp1 ([0,1],[1,0],[0.1,0.9;0.2,1.1]), [0.9 0.1; 0.8 NA], eps) +%!assert (interp1 ([0,1],[1,0],[0.1,0.9;0.2,1]), [0.9 0.1; 0.8 0], eps) ## Basic sanity checks %!assert (interp1 (1:2,1:2,1.4,"nearest"), 1) diff -r c1ce43276b86 -r 1572b5276b9a scripts/time/datevec.m --- a/scripts/time/datevec.m Thu Dec 04 16:06:31 2014 -0500 +++ b/scripts/time/datevec.m Mon Dec 08 10:15:54 2014 -0500 @@ -149,7 +149,7 @@ date = date(:); ## Move day 0 from midnight -0001-12-31 to midnight 0000-3-1 - z = floor (date) - 60; + z = double (floor (date) - 60); ## Calculate number of centuries; K1 = 0.25 is to avoid rounding problems. a = floor ((z - 0.25) / 36524.25); ## Days within century; K2 = 0.25 is to avoid rounding problems. @@ -314,4 +314,6 @@ %!test %! t = linspace (-2e5, 2e5, 10993); %! assert (all (abs (datenum (datevec (t)) - t') < 1e-5)); +%!assert (double (datevec (int64 (datenum ([2014 6 1])))), datevec (datenum ([2014 6 1]))) +%!assert (double (datevec (int64 (datenum ([2014 6 18])))), datevec (datenum ([2014 6 18])))