[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scaling for polyfit.m [patch]

From: Thomas Weber
Subject: scaling for polyfit.m [patch]
Date: Wed, 09 Aug 2006 22:38:33 +0200


some time ago we had a bug[1] filed in Debian against polyfit.m; it
breaks down for large values of x (which is known and a problem in
Matlab as well). 

Based on the idea of the bug reporter, I've changed the polyfit function
to always apply scaling, making it work for large x values.

The patch is attached; it includes a test with the data provided in the

One thing where I was unsure is which polynomial to use for calculating
the values of S; I've taken the scaled polynomial because I think most
people want the conditition value for the actual calculation.

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=348480


Attachment: polyfit.diff
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]