# HG changeset patch
# User Michael Godfrey <michaeldgodfrey@gmail.com>
# Date 1345393063 14400
# Node ID 34820dfabf84b2295aaa5274ace46302795c3d84
# Parent  f3b5cadfd6d5537f0da29f373f7ab0d4819e43df
new patch for interp1 and doc

diff -r f3b5cadfd6d5 -r 34820dfabf84 scripts/general/interp1.m
--- a/scripts/general/interp1.m	Sun Aug 19 10:50:40 2012 -0400
+++ b/scripts/general/interp1.m	Sun Aug 19 12:17:43 2012 -0400
@@ -26,9 +26,9 @@
 ##
 ## One-dimensional interpolation.  Interpolate @var{y}, defined at the
 ## points @var{x}, at the points @var{xi}.  The sample points @var{x}
-## must be monotonic.  If not specified, @var{x} is taken to be the
-## indices of @var{y}.  If @var{y} is an array, treat the columns
-## of @var{y} separately.
+## must be distinct except for a pair as described below.  If not specified,
+## @var{x} is taken to be the indices of @var{y}.  If @var{y} is an array,
+## treat the columns of @var{y} separately.
 ##
 ## Method is one of:
 ##
@@ -168,10 +168,12 @@
     y = y(p,:);
   endif
 
- ## check whether sample point @var{x} are distinct; give error if not.
-  if (any (diff (x) == 0))
-    error ("interp1: X should have distinct values");
-  endif
+ ## remove check whether sample point @var{x} are distinct; give error if not.
+ ## FIXME:  interp1 allows a pair of equal x values.  There should be
+ ## a test of only one pair.
+ ##  if (any (diff (x) == 0))
+ ##   error ("interp1: X should have distinct values");
+ ## endif
 
   starmethod = method(1) == "*";
 
