i have written the code for the first stage butterfly which is :
for (k=0;k<m;k++)
{
while (l {
if (k%2==0)
INT[k]=input[l]+W[0]*input[l+m/2];
else
INT[k]=input[l]+W[m/2]*input[l+m/2];
l=l+1;
}
}
but for the next stages there are too many variables like the input sample, the output sample,the twiddle factor.the problem i am facing is that i cant find a relation between them and hence cant understand how to run a loop so that the whole butterfly can be solved.