changeset 11845:c6c678875825 release-3-0-x

For for extrapval in interpn
author Kris Thielemans
date Sun, 21 Sep 2008 08:14:27 +0200
parents 28b0618cf67c
children 062e744728ae
files doc/interpreter/contributors.in scripts/ChangeLog scripts/general/interpn.m
diffstat 3 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/contributors.in	Fri Sep 19 23:21:15 2008 +0200
+++ b/doc/interpreter/contributors.in	Sun Sep 21 08:14:27 2008 +0200
@@ -188,6 +188,7 @@
 Ariel Tankus
 Georg Thimm
 Duncan Temple Lang
+Kris Thielemans
 Olaf Till
 Thomas Treichl
 Utkarsh Upadhyay
--- a/scripts/ChangeLog	Fri Sep 19 23:21:15 2008 +0200
+++ b/scripts/ChangeLog	Sun Sep 21 08:14:27 2008 +0200
@@ -1,3 +1,8 @@
+2008-09-18  Kris Thielemans  <kris.thielemans@csc.mrc.ac.uk>
+
+	* general/interpn.m: Fixe for extrapval and documentation of 
+	extrapval.
+
 2008-09-19  David Bateman  <dbateman@free.fr>
 
 	* general/cell2mat.m: Specialize 2D case for speed.
--- a/scripts/general/interpn.m	Fri Sep 19 23:21:15 2008 +0200
+++ b/scripts/general/interpn.m	Sun Sep 21 08:14:27 2008 +0200
@@ -55,9 +55,9 @@
 ##
 ## The default method is 'linear'.
 ##
-## 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 NA.
+## If @var{extrapval} is the scalar value, use it to replace the values
+## beyond the endpoints with that number. If @var{extrapval} is missing,
+## assume NA.
 ## @seealso{interp1, interp2, spline, ndgrid}
 ## @end deftypefn
 
@@ -79,6 +79,7 @@
       error ("extrapal is expected to be a numeric scalar");
     endif
     method = varargin{end - 1};
+    extrapval = varargin{end};
     nargs = nargs - 2;
   endif