[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: polyfit test fails
From: |
Ben Abbott |
Subject: |
Re: polyfit test fails |
Date: |
Thu, 21 May 2009 12:13:46 -0400 |
On May 21, 2009, at 9:57 AM, Marco Atzeri wrote:
Dear all,
on latest hg source, on cygwin-1.7, I have
processing /pub/hg/octave_clone/scripts/polynomial/polyfit.m
***** test
x = [ -1196.4, -1195.2, -1194, -1192.8, -1191.6, -1190.4, -1189.2,
-1188, \
-1186.8, -1185.6, -1184.4, -1183.2, -1182];
y = [ 315571.7086, 315575.9618, 315579.4195, 315582.6206,
315585.4966, \
315588.3172, 315590.9326, 315593.5934, 315596.0455,
315598.4201, \
315600.7143, 315602.9508, 315605.1765 ];
[p1, s1] = polyfit (x, y, 10);
[p2, s2, mu] = polyfit (x, y, 10);
assert (2*s2.normr < s1.normr)
!!!!! test failed
octave:5> 2*s2.normr
ans = 0.12583
octave:6> s1.normr
ans = 0.11466
is this fault cygwin specific or do you see it
on other platform ?
For OSX I get ...
octave:8> x = [ -1196.4, -1195.2, -1194, -1192.8, -1191.6, -1190.4,
-1189.2, -1188, \
> -1186.8, -1185.6, -1184.4, -1183.2, -1182];
octave:9> y = [ 315571.7086, 315575.9618, 315579.4195, 315582.6206,
315585.4966, \
> 315588.3172, 315590.9326, 315593.5934, 315596.0455,
315598.4201, \
> 315600.7143, 315602.9508, 315605.1765 ];
octave:10> [p1, s1] = polyfit (x, y, 10);
octave:11> [p2, s2, mu] = polyfit (x, y, 10);
octave:12> assert (2*s2.normr < s1.normr)
octave:13> 2*s2.normr
ans = 0.12583
octave:14> s1.normr
ans = 0.25320
If I understand these results correctly, it appears your result is
better than expected.
Perhaps the test should be changed.
Ben