How to use this method:
public static void DFT (Complex[] data, Direction direction)
if my input array is short[] samples? I can easly convert short to double to put this value to Complex struct. But this struct has two field Im and Re. So, one of these values will be my sample value right? What is the second value? Sample number?
Please help me to solve this problem, because I will not sleep today.
You should fill the
realpart of eachComplexvalue with your sample data, i.e. using LINQ:After having performed the
DFTyourcomplexSampleswill contain non-zero imaginary components (Imnon-zero). It then depends on what your subsequent actions are whether or not you need to access these imaginary components.Maybe it is also a good idea to read a little more on DFT and complex numbers on Wikipedia…