Skip to content
Snippets Groups Projects
Commit 8a60647a authored by Kristoffer Tondel's avatar Kristoffer Tondel
Browse files

Tror FFT är klar

parent e02e22de
No related branches found
No related tags found
No related merge requests found
......@@ -43,16 +43,16 @@ std::vector<std::complex<double>> fft(std::vector<std::complex<double>> f,std::v
std::vector<std::complex<double>> a2 = fft(a1,returnVector,n,flag);
std::vector<std::complex<double>> b2 = fft(b1,returnVector,n,flag);
// I and D mult.
for(int m=0;m<n/2;m++)
for(int k=0;k<n/2;k++)
{
std::complex<double> c1;
std::complex<double> c2;
c1 = a2[m] + std::pow(my,m) * b2[m];
c2 = a2[m] + std::pow(my,m+n/2) * b2[m];
c1 = a2[k] + std::pow(my,k) * b2[k];
c2 = a2[k] + std::pow(my,k+n/2) * b2[k];
returnVector[m] = c1;
returnVector[m+n/2] = c2;
returnVector[k] = c1;
returnVector[k+n/2] = c2;
}
}
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment