aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vector.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vector.c b/src/vector.c
index ac42846..7da8576 100644
--- a/src/vector.c
+++ b/src/vector.c
@@ -520,10 +520,11 @@ int xtract_peak_spectrum(const double *data, const int N, const void *argv, doub
{
if(input[n] > input[n - 1] && n + 1 < N && input[n] > input[n + 1])
{
- result[N + n] = q * (n + (p = .5 * ((y = input[n-1]) -
+ result[N + n] = q * (n + 1 + (p = .5 * ((y = input[n-1]) -
(y3 = input[n+1])) / (input[n - 1] - 2 *
(y2 = input[n]) + input[n + 1])));
result[n] = y2 - .25 * (y - y3) * p;
+ printf("result[%d] = %f\tresult[N+n] = %f\n", n, result[n], result[n+N]);
}
else
{