dudemeister88
2009-11-15 04:45:30 UTC
.......in main function ..................
for(i=750;i<800;i++)
printf("\ndatain[%d] = %lf",i,datain[i]);
myfft(datain,dataout,nn,direc);
.........
void myfft(double datain[],double dataout[],unsigned long nn,int direc){
unsigned long n, mmax, m, j, istep, i;
double normalise[3], wtemp, wr, wpr, wpi, wi, theta, tempr, tempi;
normalise[2] = 1.0;
normalise[0] = 1.0/(double)nn;
n = nn << 1;
j = 1;
mmax = 2;
for(i=750;i<800;i++)
printf("\ndatain[%d] = %lf",i,datain[i]);
but when I do this the two printf output different values of datain[i]!! I can't see how it could go wrong in between here as I haven't changed datain[i] in anyway apart from passing it to the external function and printing the values. If anyone could help that would be great and if you need any more information let me know. Thanks!!
Also, the above question is what I really want solved but a quick question, if i pass datain-1 to the external function does this just take the count of datain[i] to datain[i-1].
Cheers for the help!!!!!!!!!