Mercurial > octave
changeset 23513:4396af814c6a
maint: periodic merge of stable to default.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 18 May 2017 08:12:40 -0700 |
parents | 232c8d69d934 (current diff) 22fd2ad85218 (diff) |
children | fd7a16594614 |
files | scripts/general/interp1.m |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/general/interp1.m Thu May 18 10:53:24 2017 -0400 +++ b/scripts/general/interp1.m Thu May 18 08:12:40 2017 -0700 @@ -377,13 +377,14 @@ maxx = max (x(1), x(nx)); xi = reshape (xi, szx); - outliers = xi < minx | ! (xi <= maxx); # this even catches NaNs + outliers = (xi < minx) | ! (xi <= maxx); # this even catches NaNs if (size_equal (outliers, yi)) yi(outliers) = extrap; yi = reshape (yi, szx); - elseif (! isvector (yi)) + elseif (! isscalar (yi)) yi(outliers, :) = extrap; else + warning ("interp1: Unreachable state. Please submit data that produced this warning to bugs.octave.org"); yi(outliers.') = extrap; endif