From: Eric Firing <efiring@ha...>  20080503 17:59:36

sa6113 wrote: > Dear All, > > I have a problem using polyfit with a degree greater than 118 : The problem is that polynomial fitting generally doesn't make sense for degree higher than 4 or 5if thatand at very high degree it is inevitable that the matrix will become singular. In other words, there is not enough information in the data to uniquely determine the fit. Whatever it is you are trying to to, fitting a polynomial with a high degree is the wrong way to do it. Eric > > The code is : > matplotlib.mlab.polyfit( x, y, pow ) # pow is degree of polynomial > > for pow in range 118 and 238 the error is : > LinAlgError, 'singular martix' > > and for pow greater than 237 this error raise : > OverflowError : math range error 