#include #include #include "stats.h" #define N 372 /* number of data points */ #define ORDER 15 /* size of smoothing sample */ /* General declarations */ double dummy[N]; /* dummy weights series */ int i, j, offset; double bits_allocated[N], marg_error[N], me_average[N]; double fitted_err[N], bitvec[ORDER], mevec[ORDER]; double slope_0, intercept_0; FILE *datafile; int main(void) { datafile = fopen("smooth0.dat", "r"); if (datafile == NULL) { printf("\nCannot open data file.\n"); exit(1); } for (i = 0; i < N; i++) { fscanf(datafile, "%lf", &bits_allocated[i]); fscanf(datafile, "%lf", &marg_error[i]); fscanf(datafile, "%lf", &me_average[i]); } fclose(datafile); for (j=0;j