Mercurial > hg > octave-avbm
diff scripts/general/interpn.m @ 6742:ebf96cc00ee9
[project @ 2007-06-18 16:27:52 by jwe]
author | jwe |
---|---|
date | Mon, 18 Jun 2007 16:28:48 +0000 |
parents | 5b09d433171c |
children | 8b0cfeb06365 |
line wrap: on
line diff
--- a/scripts/general/interpn.m +++ b/scripts/general/interpn.m @@ -58,14 +58,14 @@ ## ## If @var{extrap} is the string 'extrap', then extrapolate values beyond ## the endpoints. If @var{extrap} is a number, replace values beyond the -## endpoints with that number. If @var{extrap} is missing, assume NaN. +## endpoints with that number. If @var{extrap} is missing, assume NA. ## @seealso{interp1, interp2, spline, ndgrid} ## @end deftypefn function vi = interpn (varargin) method = "linear"; - extrapval = NaN; + extrapval = NA; nargs = nargin; if (nargin < 1) @@ -150,7 +150,7 @@ method = tolower (method); if (strcmp (method, "linear")) vi = __lin_interpn__ (x{:}, v, y{:}); - vi (vi == NaN) = extrapval; + vi (isna (vi)) = extrapval; elseif (strcmp (method, "nearest")) yshape = size (y{1}); yidx = cell (1, nd);