* polyfit.c: Input matrix got overwritten too soon, leading to NaN

results for Fourier Analysis.  Fix due to Daniele Gordini.
This commit is contained in:
arno 2000-10-13 16:24:31 +00:00
parent 0aabb5f1d0
commit 70e2bc5b16
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ ft_polyfit(double *xdata, double *ydata, double *result,
memset((char *) result, 0, n * sizeof(double));
memset((char *) mat1, 0, n * n * sizeof (double));
memcpy((char *) ydata, (char *) mat2, n * sizeof (double));
memcpy((char *) mat2, (char *) ydata, n * sizeof (double));
/* Fill in the matrix with x^k for 0 <= k <= degree for each point */
l = 0;