/* tsmoo.c CCMATH mathematics library source code. * * Copyright (C) 2000 Daniel A. Atkinson All rights reserved. * This code may be redistributed under the terms of the GNU library * public license (LGPL). ( See the lgpl.license file for details.) * ------------------------------------------------------------------------ */ /* Test: smoo input file: smoo.dat */ #include "ccmath.h" #define MM 100 double x[MM],y[MM]; void main(int na,char **av) { int j,m,n; FILE *fp; if(na!=3){ printf("para: degree dfile\n"); exit(1);} m=atoi(*++av); fp=fopen(*++av,"r"); printf(" Test of Spectra Smoother\n"); for(j=0; fscanf(fp,"%lf",x+j)!=EOF ;++j) y[j]=x[j]; n=j; smoo(y,n,m); printf(" degree of smoothing = %d\n",2*m+1); printf(" input smoothed\n"); for(j=0; j