This commit is contained in:
kbecke23 2018-05-11 12:00:37 +02:00
parent 62ffcca286
commit 66177c97da
1 changed files with 153 additions and 152 deletions

View File

@ -162,7 +162,7 @@ void localMean(void) {
for (xCount = 1; xCount < NUMBER_OF_SAMPLES; xCount++) { // first value will not get predicted
double xPartArray[xCount]; //includes all values at the size of runtime var
//double xPartArray[1000]; //includes all values at the size of runtime var
//int _sourceIndex = (xCount > WINDOWSIZE) ? xCount - WINDOWSIZE : xCount;
int _arrayLength = (xCount > WINDOWSIZE) ? WINDOWSIZE + 1 : xCount;
//printf("xCount:%d, length:%d\n", xCount, _arrayLength);
@ -247,7 +247,7 @@ void directPredecessor(void) {
fprintf(fp3, "\n=====================================DirectPredecessor=====================================\n");
for (xCount = 1; xCount < NUMBER_OF_SAMPLES + 1; xCount++) {
double xPartArray[xCount]; //includes all values at the size of runtime var
//double xPartArray[xCount]; //includes all values at the size of runtime var
//int _sourceIndex = (xCount > WINDOWSIZE) ? xCount - WINDOWSIZE : xCount;
int _arrayLength = (xCount > WINDOWSIZE) ? WINDOWSIZE + 1 : xCount;
printf("xCount:%d, length:%d\n", xCount, _arrayLength);
@ -473,7 +473,8 @@ double sum_array(double x[], int xlength) {
double *popNAN(double *xError, int xErrorLength) {
int i, counter;
double noNAN [xErrorLength];
double noNAN[10];
realloc(noNAN, xErrorLength);
for (i = 0; i < xErrorLength; i++) {
if (!isnan(xError[i])) {