Commit 27d8a14c by Tobias WEBER

### small comment

parent 6a185507
 ... ... @@ -130,7 +130,14 @@ void cvec_to_arrs(const std::vector>& vec, T* pReal, T* pImag) /** * tShift=1: shift 1 sample to the right * tShift=-11: shift 1 sample to the left * tShift=-1: shift 1 sample to the left * * DFT: x'[k] = sum(n=0..N-1) x[n] exp(-2pi*i*k * n/N) * * assume data set is shifted (and assume wrapping around of array): * x'[k] = sum(n=0..N-1) x[n-shift] exp(-2pi*i*k * n/N) * x'[k] = sum(n=0..N-1) x[n] exp(-2pi*i*k * (n+shift)/N) * x'[k] = sum(n=0..N-1) x[n] exp(-2pi*i*k * n/N) exp(-2pi*i*k * shift/N) */ template std::vector> dft_shift(const std::vector>& vecIn, T tShift=1.) ... ... @@ -139,13 +146,14 @@ std::vector> dft_shift(const std::vector>& vecIn std::vector> vecOut; vecOut.reserve(N); for(std::size_t i=0; i()*i*tShift / N); const T s = std::sin(T(2)*get_pi()*i*tShift / N); // multiply with e^(-2pi*i * k*shift/N) const T c = std::cos(T(2)*get_pi()*k*tShift / N); const T s = std::sin(T(2)*get_pi()*k*tShift / N); std::complex ph(c, -s); vecOut.push_back(vecIn[i]*ph); vecOut.push_back(vecIn[k]*ph); } return vecOut; ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!