#include main () { int i,j,nstep,num_link,n, toLink, nottoLink; char outname[100], inname[100]; char line[100]; char dc[20]; double min, max, stepsize,cper, freq, Twave, Tdc, foo; FILE *infile, *outfile; //cper=208e-9; cper=9.77e-9; Twave=1536*cper; //80 is the number of voltage values Tdc=cper;// 8 is the number of voltage values again. nstep=200; //nstep=500; min=50000; max=60000; sprintf (outname, "seq.txt"); sprintf (inname, "wave.wav"); sprintf (dc, "10"); if (( outfile=fopen (outname, "w" )) == NULL ) { printf("error writing to: %s\n", outname); return(-1); } /* if (( infile=fopen (inname, "r" )) == NULL ) { */ /* printf("error reading from: %s\n", inname); */ /* return(-1); */ /* } */ fprintf(outfile,"#ISETUP,my.set;C1I,ON;C1O,-.48V;LOAD,friday.wav;GO;"); fprintf(outfile,"TRIGGER_MODE,RECURRENT;CPER,%.3e;",cper); stepsize=(max-min)/nstep; printf("stepsize: %f\n", stepsize); freq=min; for(i=0; i