additional features for peak picking

This commit is contained in:
Mark Borgerding
2003-08-09 01:03:04 +00:00
parent fa03256dc2
commit ccbc48dc63
7 changed files with 287 additions and 47 deletions

32
testsig.c Normal file
View File

@ -0,0 +1,32 @@
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
int usage()
{
fprintf(stderr,"usage:testsig nsamps\n");
exit(1);
return 1;
}
double randphase()
{
return (double)rand()*2*3.14159/RAND_MAX;
}
int main(int argc, char ** argv)
{
float samps[2];
int nsamps;
if (argc != 2)
return usage();
nsamps = atoi( argv[1] );
while (nsamps-- > 0) {
samps[0]=sin( randphase() );
samps[1]=sin( randphase() );
fwrite(samps,sizeof(samps),1,stdout);
}
return 0;
}