From ee25151afacdd485cdc05966355dab43e882427d Mon Sep 17 00:00:00 2001 From: gurkenhabicht Date: Tue, 12 Jun 2018 13:04:05 +0200 Subject: [PATCH] added NLMS graphing --- src/ansi_c_implementation/NLMSvariants.c | 7 +++++-- src/ansi_c_implementation/graphResults_template.html | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ansi_c_implementation/NLMSvariants.c b/src/ansi_c_implementation/NLMSvariants.c index 40f01ea..b3891dc 100644 --- a/src/ansi_c_implementation/NLMSvariants.c +++ b/src/ansi_c_implementation/NLMSvariants.c @@ -604,6 +604,8 @@ formats output of mkSvgGraph -- Please open graphResults.html to see the output- [4] = xError from localMean, [5] = xError from directPredecessor, [6] = xError from differentialPredecessor + [7] = xPredicted from NLMS, + [8] = xError from NLMS ====================================================================================================== */ @@ -629,12 +631,13 @@ void bufferLogger(char *buffer, point_t points[]) { sprintf(_buffer, "L %f %f\n", points[i].xVal[3], points[i].yVal[3]); strcat(buffer, _buffer); } - strcat(buffer, "\" fill=\"none\" id=\"svg_4\" stroke=\"red\" stroke-width=\"0.4px\"/>\n"); + strcat(buffer, "\" fill=\"none\" id=\"svg_4\" stroke=\"red\" stroke-width=\"0.4px\"/>\nsamplesCount - 1; i++) { //xPredicted from diff Pred sprintf(_buffer, "L %f %f\n", points[i].xVal[7], points[i].yVal[7]); strcat(buffer, _buffer); } - strcat(buffer, "\" fill=\"none\" id=\"svg_5\" stroke=\"yellow\" stroke-width=\"0.4px\"/>\n"); + strcat(buffer, "\" fill=\"none\" id=\"svg_5\" stroke=\"gray\" stroke-width=\"0.4px\"/>\n"); + } diff --git a/src/ansi_c_implementation/graphResults_template.html b/src/ansi_c_implementation/graphResults_template.html index a616c6c..6be5d5d 100644 --- a/src/ansi_c_implementation/graphResults_template.html +++ b/src/ansi_c_implementation/graphResults_template.html @@ -6,7 +6,9 @@

Image Samples | Local Mean | Direct predecessor | - Differential predecessor

+ Differential predecessor| + Standard NLMS +