The inverse Fourier transform

Sdílet
Vložit
  • čas přidán 15. 07. 2024
  • This video lesson is part of a complete course on neuroscience time series analyses.
    The full course includes
    - over 47 hours of video instruction
    - lots and lots of MATLAB exercises and problem sets
    - access to a dedicated Q&A forum.
    You can find out more here:
    www.udemy.com/course/solved-c...
    For more online courses about programming, data analysis, linear algebra, and statistics, see
    sincxpress.com/
  • Věda a technologie

Komentáře • 22

  • @mavinicesumaljag2023
    @mavinicesumaljag2023 Před rokem +3

    at least i know what my dog hears when my talking to him.

  • @emmanuelasante9995
    @emmanuelasante9995 Před 2 lety +1

    Thanks for this video. Infact, inverse Fourier Transform is explicitly explained

  • @jangky97
    @jangky97 Před rokem

    Thank you for this video, Mike X Cohen. It really helped me a lot, though I have some questions in mind. If you multiply complex sine wave to matching fourier coefficient, aren't the outputs in the form of complex numbers? And if that is true, how do you sum them up to get the original time domain signal? Again, thanks for good quality lecture!

    • @mikexcohen1
      @mikexcohen1  Před rokem

      Yes! Great thinking, Dean. The thing is that for a real-valued signal, the positive and negative frequencies have complimentary (conjugate) imaginary parts that cancel in the end. It's admittedly not really intuitive at first. It's also not so difficult to understand, but that's a level of detail that I don't cover in this video (I explain this in my full-length FT course though).

  • @chansonjoy
    @chansonjoy Před 4 lety +1

    To invert FFT, it is not use a single Fourier coefficient to times the complex signal wave conjugate, in stead it loops all the Fourier coefficients, times the complex signal wave conjugate, sum the result then divided by N

    • @mikexcohen1
      @mikexcohen1  Před 4 lety +2

      Right, and what happens inside that for-loop over the coefficients? Each coefficient is multiplied by a complex sine wave. That's what I discuss in the video.

  • @user-bk3cm8tn8k
    @user-bk3cm8tn8k Před 11 měsíci

    Thanks for the video! I have a somewhat complex problem and would appreciate some help: I would like to subtract the baseline activity of a control task from the main trials, trial-by-trial, not averaged. Is this possible? After that I want to use a toolbox for single-trial regression where I need the data in the time domain. Does the correction have to be done in the TF domain or is the time domain sufficient? If it has to be done in the tf domain, can I then bring the data back into the time domain via an inverse transformation for the toolbox I want to use? Thanks for your help!

    • @mikexcohen1
      @mikexcohen1  Před 11 měsíci

      Single-trial baseline normalization in the time domain is no problem. In the frequency or time-frequency domain, it's possible but tricky because the normalization is divisive, so outliers in the baseline can have serious impacts on the results. For single-trial analyses, you might not need to baseline-normalize.

    • @user-bk3cm8tn8k
      @user-bk3cm8tn8k Před 11 měsíci

      @@mikexcohen1 Thanks for the quick reply! This is a great help! The goal is to use the corrected data as input for the single-trial regression. There are two data sets that differ at the trial level in only one condition and I would like to subtract one data set from the other to control for it. Is there anything against doing this "baseline" correction in the time domain then not only trial-wise but also sample point-wise?

  • @susmitapanda8895
    @susmitapanda8895 Před 3 lety

    Sir please upload videos on IFFT in matlab conversion from frequency to time domain. I am stucked at a point and would like to learn from you.

    • @mikexcohen1
      @mikexcohen1  Před 3 lety +1

      Perhaps this one is useful: czcams.com/video/tUoE_pyAZn4/video.html

  • @STKeTcH
    @STKeTcH Před 2 lety

    i have no idea how to apply these ideas to my exact math course (no calculator)

  • @arash4232
    @arash4232 Před rokem

    Hi,
    What about the phaze? None of the sine or cosine waves have phase?

    • @mikexcohen1
      @mikexcohen1  Před rokem

      Yes, the phase is embedded in the complex-valued Fourier coefficient. Geometrically, it's the angle of the line from the origin to the coefficient, relative to the positive real axis.

  • @leagoo52
    @leagoo52 Před rokem

    I have a question regarding correctness of explained theory. You explain inverse Fourier transform as this: create goniometric wave (sine, cosine) and multiply it with one Fourier coefficient that is part of input data. This will give you one intermediate wave. Then create another goniometric wave of different frequency and multiply it with another Fourier coefficient to obtain another intermediate wave. And so on. At the end sum all intermediate waves together to obtain original wave (obtain time domain signal).
    Publicly available source code does it differently. It generates just one point of goniometric wave and multiples it with one Fourier coefficient. Then generate second point of goniometric wave and multiply it with second Fourier coefficient and so on. Sum all results into one number which is one point of original signal (obviously unscaled). Then continue the same procedure with goniometric wave of different frequency.
    Could you please comment on both approaches if they are the same?
    Here is publicly available code for dft:
    static void dft(double[] inreal , double[] inimag,
    double[] outreal, double[] outimag) {
    int n = inreal.length;
    for (int k = 0; k < n; k++) { // For each output element
    double sumreal = 0;
    double sumimag = 0;
    for (int t = 0; t < n; t++) { // For each input element
    double angle = 2 * Math.PI * t * k / n;
    sumreal += inreal[t] * Math.cos(angle) + inimag[t] * Math.sin(angle);
    sumimag += -inreal[t] * Math.sin(angle) + inimag[t] * Math.cos(angle);
    }
    outreal[k] = sumreal;
    outimag[k] = sumimag;
    }
    }

    • @mikexcohen1
      @mikexcohen1  Před rokem

      Hi Lea. The code you pasted is for the forward FT, but this video is about the inverse FT. Those are different transforms. The code you pasted matches my description of the forward FT, although I describe it in terms of vector computations while this implementation is point-wise.

  • @ilaygussarsky8296
    @ilaygussarsky8296 Před 4 lety +1

    Why minus 1?

  • @douggale5962
    @douggale5962 Před rokem

    I was watching the whole time to see how you converted the imaginary part to a phase angle. Did I miss it? Is it already radians or something?

    • @mikexcohen1
      @mikexcohen1  Před rokem +1

      Hi Doug. The phase angle comes from the combination of real and imaginary parts, not from either. In particular, the phase angle is the tangent of the imaginary over the real part. So it's all embedded in the complex-valued Fourier coefficients.

    • @douggale5962
      @douggale5962 Před rokem

      @@mikexcohen1 I see, atan2(imaginary, real)
      (or for non programmers, tan^-1(imaginary/real)). Thanks.

  • @Simien.0
    @Simien.0 Před 2 lety +1

    The mind is represented perfectly by eulers formula, the complex circle is equal to 0, through Fourier mathematics we as eternal minds, can and do create everything around us, this is a shared dream, sin and cosine waves are the most basic mathematical component of space time, they are non orthogonal waves, while purely mental unextended waves are interaxial. We as minds are equal to 0, and 0 also contains every possible value, from imaginary numbers to real numbers.