Polyfit with scaling
Ben Abbott
bpabbott at mac.com
Sun Feb 3 19:41:55 CST 2008
On Feb 3, 2008, at 7:50 PM, Dmitri A. Sergatskov wrote:
> On Feb 3, 2008 6:20 PM, Ben Abbott <bpabbott at mac.com> wrote:
>
>> Give these results and the need to remain compatible with past
>> expectations,
>> and with Matlab, I'm inclined to make both QR and normalization
>> optional.
>>
>
> In that case can we just leave things as they are and perhaps just
> add some
> words to help file? (May be also pointing to the wpolyfit file).
> I am curious to see how well Matlab handles your benchmark.
Regarding leaving things as they are, the normalization is not
something I'd expect most users to desire to handle for themselves.
However we might either provide for optional normalization, or provide
the routines to do so.
Regarding how Matlab handles this benchmark here are the results.
Matlab
N M norm(y-yfit) norm(p-fit)
1 2 2.542114973e-13 2.955859084e-12
1 3 3.410605132e-13 1.693934712e-11
2 3 1.028152284e-09 1.323761177e-06
2 4 4.440674381e-10 3.319473118e-06
2 5 4.939083810e-10 4.947078972e-06
3 4 2.189135306e-06 5.694889319e+00
3 5 1.099055345e-06 2.955133100e+00
3 6 7.348554138e-07 3.296905699e+00
3 7 1.217871795e-06 5.411753547e+00
4 5 1.196039913e-03 2.780029492e+06
4 6 2.441406250e-03 9.003165440e+05
4 7 3.895778546e-03 4.993247502e+06
4 8 3.054689407e-03 5.591453444e+05
4 9 1.708984375e-03 3.790911374e+05
Matlab's results appear consistent with QR without normalization.
Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/octave-maintainers/attachments/20080203/866108e5/attachment.html
More information about the Octave-maintainers
mailing list