changeset 15082:902a8e27b2a2

splinefit.m: Increase tolerance for %!tests. Use rand, not randn, for generating test data. * splinefit.m: Increase tolerance for %!tests. Use rand, not randn, for generating test data.
author Rik <rik@octave.org>
date Thu, 02 Aug 2012 14:02:26 -0700
parents dda73cb60ac5
children 83749bb7f538
files scripts/polynomial/splinefit.m
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/polynomial/splinefit.m	Wed Aug 01 16:44:16 2012 -0700
+++ b/scripts/polynomial/splinefit.m	Thu Aug 02 14:02:26 2012 -0700
@@ -221,20 +221,19 @@
   pp = __splinefit__ (x, y, breaks, args{:});
 endfunction
 
+
 %!shared xb, yb, x
-%! randn ("state", 13);
 %! xb = 0:2:10;
-%! yb = randn (size (xb));
+%! yb = 2*rand (size (xb)) - 1;
 %! x = 0:0.1:10;
 
 %!test
 %! y = interp1 (xb, yb, x, "linear");
-%! assert (ppval (splinefit (x, y, xb, "order", 1), x), y, 10 * eps ());
+%! assert (ppval (splinefit (x, y, xb, "order", 1), x), y, 15 * eps ());
 %!test
 %! y = interp1 (xb, yb, x, "spline");
-%! assert (ppval (splinefit (x, y, xb, "order", 3), x), y, 10 * eps ());
+%! assert (ppval (splinefit (x, y, xb, "order", 3), x), y, 15 * eps ());
 %!test
 %! y = interp1 (xb, yb, x, "spline");
-%! assert (ppval (splinefit (x, y, xb), x), y, 10 * eps ());
+%! assert (ppval (splinefit (x, y, xb), x), y, 15 * eps ());
 
-