added NLMS graphing

This commit is contained in:
gurkenhabicht 2018-06-12 13:04:05 +02:00
parent a2112e3de2
commit ee25151afa
2 changed files with 8 additions and 3 deletions

View File

@ -604,6 +604,8 @@ formats output of mkSvgGraph -- Please open graphResults.html to see the output-
[4] = xError from localMean, [4] = xError from localMean,
[5] = xError from directPredecessor, [5] = xError from directPredecessor,
[6] = xError from differentialPredecessor [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]); sprintf(_buffer, "L %f %f\n", points[i].xVal[3], points[i].yVal[3]);
strcat(buffer, _buffer); 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\"/>\n<path d=\"M0 0\n");
for (i = 1; i < mlData->samplesCount - 1; i++) { //xPredicted from diff Pred for (i = 1; i < mlData->samplesCount - 1; i++) { //xPredicted from diff Pred
sprintf(_buffer, "L %f %f\n", points[i].xVal[7], points[i].yVal[7]); sprintf(_buffer, "L %f %f\n", points[i].xVal[7], points[i].yVal[7]);
strcat(buffer, _buffer); 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");
} }

View File

@ -6,7 +6,9 @@
<h2><font face="arial" id="1" color="black" onclick="clicksvg(this)">Image Samples</font> | <h2><font face="arial" id="1" color="black" onclick="clicksvg(this)">Image Samples</font> |
<font face="arial" id="2" color="green" onclick="clicksvg(this)">Local Mean</font> | <font face="arial" id="2" color="green" onclick="clicksvg(this)">Local Mean</font> |
<font face="arial" id="3" color="blue" onclick="clicksvg(this)">Direct predecessor</font> | <font face="arial" id="3" color="blue" onclick="clicksvg(this)">Direct predecessor</font> |
<font face="arial" id="4" color="red" onclick="clicksvg(this)">Differential predecessor</font></h2> <font face="arial" id="4" color="red" onclick="clicksvg(this)">Differential predecessor</font>|
<font face="arial" id="5" color="gray" onclick="clicksvg(this)">Standard NLMS</font>
</h2>
<script> <script>
function clicksvg(e){ function clicksvg(e){
id = e.id id = e.id