From 70e2bc5b16e6730e132dd3b3029223c6a950de77 Mon Sep 17 00:00:00 2001 From: arno Date: Fri, 13 Oct 2000 16:24:31 +0000 Subject: [PATCH] * polyfit.c: Input matrix got overwritten too soon, leading to NaN results for Fourier Analysis. Fix due to Daniele Gordini. --- src/maths/poly/polyfit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/maths/poly/polyfit.c b/src/maths/poly/polyfit.c index 44ba47cfa..f254d49a7 100644 --- a/src/maths/poly/polyfit.c +++ b/src/maths/poly/polyfit.c @@ -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;