/* genampdata.c Generates test sparse amplitude data for vqtrainsp testing. */ #include #include #include #include #include #include #include "../src/defines.h" typedef struct { float real; float imag; } COMP; #define NVEC 200000 #define D 2 #define E 8 int main(void) { FILE *f=fopen("testamp.flt", "wb"); int i, j, m, L, index; float amp, noisey_amp, pitch, Wo; float sparse_pe[MAX_AMP]; #ifdef TEST1 /* D fixed amplitude vectors of E elements long, with D=2, E=8: $ ./vqtrainsp testamp.flt 2 8 test.txt test.txt should be same as training data. */ for(i=0; i