# HG changeset patch # User Rik # Date 1343941346 25200 # Node ID 902a8e27b2a28c2c0b4455bfce7f847b626d1a24 # Parent dda73cb60ac507f7b172a60203f0cdf66748f747 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. diff --git a/scripts/polynomial/splinefit.m b/scripts/polynomial/splinefit.m --- a/scripts/polynomial/splinefit.m +++ b/scripts/polynomial/splinefit.m @@ -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 ()); -