/* mydata.c: writes out sin(x), from 0-360 degrees, to a file sine.dat */

#include <math.h>
#include <stdio.h>

#define OUTD1 "mydata.dat" 

main() {

int i, n;
FILE *out1;

out1 = fopen(OUTD1, "w");

for (n = 0; n <= 1000; n+=5) {
     fprintf(out1,"%f %f\n", (float)n, exp(-(float)n/360.0)*sin(2.0*M_PI*(float)n/360.0));
}

fclose(out1);

} /* the end */

