Simple and Easy Tutorial on FFT Fast Fourier Transform Matlab Part 1

Поделиться
HTML-код
  • Опубликовано: 12 янв 2025

Комментарии • 124

  • @Invisible__Woman
    @Invisible__Woman 7 лет назад +2

    I don't know anything neither about the Matlab or the any computer language before but I need to plot the FFT. Your tutorials are very easily to follow. I'm appreciated that much.

  • @onnees
    @onnees 6 лет назад

    Hi, it is really helpful for me to try FFT in Matlab. I couldn't find any better videos explaining how to do FFT in matlab in youtube. Thanks!

  • @learnhome6897
    @learnhome6897 7 лет назад +5

    Thanks, dude it,s really helpful. i saw a lot of clips but could not get a better solution. thanks again

  • @Chronum
    @Chronum 7 лет назад +1

    Very clear explanation, thank you!

  • @abakygolden
    @abakygolden 7 лет назад +1

    Best explanation I found ! Nice job

  • @thebudkellyfiles
    @thebudkellyfiles 6 лет назад +1

    Thank you. This is superb. I finally get this.

  • @alistairborthwick2031
    @alistairborthwick2031 8 лет назад +2

    Ah! Now I see why dt=0:Ts:2-Ts;
    2000 samples of 1 millisecond, not 2001 samples.
    Great video, thanks!

  • @amirrasyadan
    @amirrasyadan 8 лет назад +1

    Thank you very much Asraf..! this is very useful for me..Im new with matlab and my research is in motor current signature analysis..

  • @iamrahulkv
    @iamrahulkv 5 лет назад

    Perfectly Explained...Thanks a lot!

  • @huyennguyen88
    @huyennguyen88 6 лет назад

    Thank you very much, it's very helpful and easily to understand :)))

  • @akifnadeem5132
    @akifnadeem5132 7 лет назад +2

    JazakAllah, stay Blessed !!

  • @chef7474741
    @chef7474741 7 лет назад +1

    Salam Mohamed, thank you very much it is useful video

  • @TheBiggestMan007
    @TheBiggestMan007 5 лет назад +1

    Great tutorial! Thanks a lot!

  • @maryamghodousi9541
    @maryamghodousi9541 Год назад +1

    Thank you so much👌

  • @haveanicetime
    @haveanicetime 7 лет назад

    Mr. Eng. Asraf, Fabelhaft, Total Super!, Ich gratuliere!

  • @yf6595
    @yf6595 5 лет назад

    Simply good👍

  • @hungcheichi7576
    @hungcheichi7576 6 лет назад +1

    Great work!

  • @belmadaniissam3565
    @belmadaniissam3565 5 лет назад

    thank you it was verry helpfull

  • @1분프랑스어
    @1분프랑스어 Год назад +1

    Thank you very much !!

  • @1310heid
    @1310heid 8 лет назад +2

    thanks a lot my friend !

  • @BSS0202
    @BSS0202 7 лет назад +1

    Sincerely, thank you!

  • @mohamedaboelfath6965
    @mohamedaboelfath6965 8 лет назад +2

    hello, this was really a beneficial tutorial.
    but can you, please do the same analysis in Simulink

  • @abduossaid5483
    @abduossaid5483 2 месяца назад

    Thanks for this nice video! What do you with "the number of the length of the signal must be equal to 2 power off.... to have good resolution" at 11:04s ?

  • @jameshopkins3541
    @jameshopkins3541 Год назад

    ILEGIBLE

  • @abdulhakimal-hakim1211
    @abdulhakimal-hakim1211 6 лет назад +1

    Thanks Mohamed

  • @dakoje2951
    @dakoje2951 5 лет назад

    godsend. thank you

  • @emmanueldavidmendozazapata874
    @emmanueldavidmendozazapata874 7 лет назад

    Because the amplitudes come out different if it is the same value for the three of 10, which can be done to get the true amplitude.

  • @shaheenmongam8980
    @shaheenmongam8980 6 лет назад +3

    When I did the fft using the 'nextpow2' mentioned here, I am getting different amplitudes at each frequency (same as you). But when I tried directly without using that, I am getting same amplitudes for each of the peaks which is how it supposed to be! So, using nextpow2 makes the results incorrect, isn't it?

    • @yarenkaya7872
      @yarenkaya7872 Год назад

      I am also confused why we need the next power of 2

  • @qicarrie3835
    @qicarrie3835 8 лет назад +2

    I am chinese,english poor.it would be perfect with subtitle!! Anyway ,thanks for your work!!!!

  • @rakatmurshed4409
    @rakatmurshed4409 5 лет назад +1

    please make a video on Independent Component Analysis and Principal Component Analysis.

  • @anandshek06
    @anandshek06 5 лет назад +1

    Thank you for the video. Can you increase the font size of the code when you post the next one ? It's not very clear even with 480p :) ...

  • @Jdonovanford
    @Jdonovanford 7 лет назад +1

    Thanks, Asraf! One question, why to get a good freq resolution we need to have 2^nextpow2()? What is the theoretical reason? Thanks!

  • @bojanajankovic8359
    @bojanajankovic8359 6 лет назад

    Hi! This was such a helpful tutorial! But I am also wondering, for example, how can I get the exact values of the amplitude for the bands? Like, can you get it in a form of table or something?

  • @drdrumdude92
    @drdrumdude92 7 лет назад

    Thanks for the video. Why does the FFT work better with an nfft that is a power of 2?

    • @asrafmohamedmoubark
      @asrafmohamedmoubark  7 лет назад

      Hi, This is because of the decimation-in-time algorithm. The calculation takes place such for basic butterfly computation in power of 2 by dividing the total units into 2 separate parts to increase its efficiency.

    • @drdrumdude92
      @drdrumdude92 7 лет назад

      Thank you for the response. Another question: when you plot the FFT at the end, the amplitude for each frequency is different...shouldn't they be the same regardless of the y-axis scaling? Why are they different? (I did watch the second video and I'm still confused by this point).

  • @pafnunciog.g.8638
    @pafnunciog.g.8638 6 лет назад +8

    It seems to be a very interesting video, however the continuous clicking sound I find it very distractive and had to stop watching it. Could you kindly remove that sound? Thanks for your help.

    • @johnc.5600
      @johnc.5600 5 лет назад +9

      He can delete the sound using FFT in matlab

    • @MicEE2998e5
      @MicEE2998e5 5 лет назад

      @@johnc.5600 I concur

  • @tibiti67
    @tibiti67 5 лет назад

    Does the matlab's fft returns the Fourier Transform that we can calculate by hand?

  • @yummigummi4116
    @yummigummi4116 7 лет назад +1

    Hey Asraf, thanks for the great video! My frequency domain signal has much sharper peaks, when I am using ff=fft(y4,nfft) instead of ff=fft(y4,nfft2). Why is that? I read, as you said, that the performance of FFT is better when the number of samples is a power of 2, but for me it looks like the resolution is worse?

    • @asrafmohamedmoubark
      @asrafmohamedmoubark  7 лет назад

      Paul-Jasper Sahr hi..thank you for watching..can you post your code here so that i can have a look..cheers

    • @yummigummi4116
      @yummigummi4116 7 лет назад

      Hey, Thanks for the quick reply! I took two screenshots with the plotted frequency signal. One with the samples as a power of 2 (here: drive.google.com/open?id=1YRxOXiM2icNdeQFneEQkEviDpru7shEe ) and one without (here: drive.google.com/open?id=1n2zufAxZadMLnxXAnMzQBOgFMItwNpT2 )

    • @asrafmohamedmoubark
      @asrafmohamedmoubark  7 лет назад

      hi, if you look carefully, the power of 2 gives more accurate results than the one without the power of two. Try to have look at the x-axis which represents the sample for the frequencies. cheers

    • @yummigummi4116
      @yummigummi4116 7 лет назад

      Hey :) the peak with the power of two is wider at the bottom. Thats less accurate, isn't it? Or what do you mean by accuarte?

    • @asrafmohamedmoubark
      @asrafmohamedmoubark  7 лет назад

      what are you expecting from the FFT? the frequencies information right? it is not about wider the mainlobes..but the peaks that indicate the real frequencies values..cheers

  • @sumanshrestha9867
    @sumanshrestha9867 5 лет назад +1

    hi mate this is useful but if we have got the signals from the sensors how can we get into time and frequency domain?

    • @asrafmohamedmoubark
      @asrafmohamedmoubark  5 лет назад

      Hi..by using analog to digital converter (ADC) ..thank you

    • @sumanshrestha9867
      @sumanshrestha9867 5 лет назад

      @@asrafmohamedmoubark I used myrio to collect data from current sensor. Now I have got the time and amplitude so i am confused about the time domain analysis.

  • @MrAntreaspaok
    @MrAntreaspaok 8 лет назад +1

    thank you.

  • @harshaldeore
    @harshaldeore 6 лет назад +1

    use fft on ur video also n remove that pen noise.

  • @KRSK36
    @KRSK36 7 лет назад +2

    Nice video. Sound explanation. Good tutorial.
    But,
    While making line drawings of example graphs, that high pitched 'tock tock' sound could have been eliminated
    Why didn't you zoom the code while writing them?This makes hard to see them.

  • @Appleiphones1
    @Appleiphones1 8 лет назад

    how can i get fundamental components of my current and voltage signals?using DFT

  • @zaspanyflegmatyk2446
    @zaspanyflegmatyk2446 5 лет назад

    Thanks!

  • @gic3566
    @gic3566 8 лет назад

    why do you do the 'changing to the power of 2' part? you suggest that it is needed for a good 'resolution', what do you mean by it?

    • @gic3566
      @gic3566 8 лет назад

      because all I see that it does, is that it just doesnt give any values after 2000...

    • @gic3566
      @gic3566 8 лет назад

      Oh sorry, I think I mightv been wrong on that

  • @lucasbeathyate2879
    @lucasbeathyate2879 8 лет назад +1

    Hi I´ve have a question? How do u make an active noise cancellation on matlab do u have a video? Can u help me?

    • @asrafmohamedmoubark
      @asrafmohamedmoubark  8 лет назад

      Hi, Can you be more details? Thank you

    • @lucasbeathyate2879
      @lucasbeathyate2879 8 лет назад

      hola! te escibo en español porque es mi lengua natal, estoy haciendo unos auricuales para sordes y estoy nescesitando ayuda. Le quiero aplican noise cancelletioncon un filtro adaptivo tienes algun video al respecto?

  • @keesgeerligs8123
    @keesgeerligs8123 6 лет назад +1

    Thanks

  • @soufianeaitmbarek5849
    @soufianeaitmbarek5849 7 лет назад +3

    Hi.. thx for the video
    My qst is why the amplitude of the spectrum of signal is very hight, it should be 10
    why here we found 2.5*10^5?

    • @asrafmohamedmoubark
      @asrafmohamedmoubark  7 лет назад

      hi..its a output from FFT (correlation process). I didn't normalized and convert it to right amplitude level since my objective or intention is to show the frequencies of each of the signal. We can plot the right amplitude for each signal by finding each bin or the right sample where the peak of the frequency indicated. Thank you

    • @walidtawfik2000
      @walidtawfik2000 7 лет назад

      Hello Mr. Ashraf, thanks for your videos.
      Please, I need the code of the "Convolution Animation Finite Impulse Response (FIR) Low Pass Filter LPF Matlab"
      Thanks.
      Best regards

    • @KRSK36
      @KRSK36 7 лет назад

      @Dr. Walid Tawfik
      same thing struck me. Thnks for asking.

    • @KRSK36
      @KRSK36 7 лет назад

      asraf mohamed
      Thanks for the reply sir.
      Can you please say how to "plot the right amplitude for each signal by finding each bin or the right sample where the peak of the frequency indicated".

  • @veta1000
    @veta1000 8 лет назад +1

    When I enter the line "dt=0:Ts:2-Ts"
    it is showing empty matrix.
    I am using Matlab 2010
    what should I have to do

    • @asrafmohamedmoubark
      @asrafmohamedmoubark  8 лет назад

      Hi..have you declare Ts first? Variable in Matlab should be in order. Thank you

  • @matthewjames7513
    @matthewjames7513 6 лет назад +1

    The frequenices should be at 10, 20 and 30. Why are they showing up as much higher values ~500?

    • @matthewjames7513
      @matthewjames7513 6 лет назад

      Nevermind I watched your next video and everything was made clear! Thanks a lot you're a great teacher :)

  • @kunfeng4770
    @kunfeng4770 7 лет назад +1

    Thanks.

  • @daveseah7883
    @daveseah7883 5 лет назад

    are we able to do the same thing but with C language? I cant really find any working code using C.

  • @paulmorrison2504
    @paulmorrison2504 7 лет назад

    hi, how could i write a Matlab program that enables me to specify and keep only a proportion of the Fourier Transforms of largest magnitude from an image representation.

    • @asrafmohamedmoubark
      @asrafmohamedmoubark  7 лет назад

      Hi, Maybe you can use 'max( )' command in order to find the largest or biggest magnitude in 1D and 'max(max( ) )' for 2D. Hope it helpful. Thank you

  • @loveyourselves3877
    @loveyourselves3877 7 лет назад

    thank you

  • @mudmud357
    @mudmud357 7 лет назад

    hi Asraf - u mentioned the sampling frequency should be twice the income signal (Fs part of ur code). So if i had real data extracted at 500 KHz, my sampling should be 500KHz not 1000KHz, right ? still a bit unclear why you say double it at Fs , how we decide it.Thanks !!!!!

    • @asrafmohamedmoubark
      @asrafmohamedmoubark  7 лет назад +1

      Fs should be at least 1000khz in your case..you can set also to 2000khz..5000khz..and so on

    • @mudmud357
      @mudmud357 7 лет назад

      ok thanks.

  • @WendyFeGu
    @WendyFeGu 7 лет назад +1

    I am following the video line by line but when I plot the abs value of ff I get 2.5x10^4 in the x axis and 9000 in the y axis. Any explanation?

    • @asrafmohamedmoubark
      @asrafmohamedmoubark  7 лет назад +1

      hi..When you do fft to any time domain signal, you should get on y-axis the amplitude of the frequencies component and on x-axis the frequencies values. Usually, the x-axis represented by a number of samples, thus you must convert it accordingly so that it represent the right frequencies values in orders.

    • @WendyFeGu
      @WendyFeGu 7 лет назад +1

      Thank you for the fast reply and your videos!!!

  • @midastechsolutions1333
    @midastechsolutions1333 8 лет назад +1

    Hello Asraf Mohamed..!! Thanks for the tutorial. To convert this fft script file into a function file, Fs,Ts,f1,f2 and f3 are the inputs. What will the output declaration look like? Please avail me with useful materials for writing functions, thanks.

    • @asrafmohamedmoubark
      @asrafmohamedmoubark  8 лет назад

      Sadiq Ibn Abubakr hi..you can declare any variable name as your output

    • @asrafmohamedmoubark
      @asrafmohamedmoubark  8 лет назад

      Sadiq Ibn Abubakr hi..you can declare any variable name as your output

  • @andrescamacho5577
    @andrescamacho5577 7 лет назад

    How can I plot the right amplitude?

  • @angelicaarroyo7521
    @angelicaarroyo7521 8 лет назад

    Hi
    I have a file with my data when I charge workspace appears "32X7680 double" And I know the frequency sampling and time. How can I calculate the FFT?
    Sorry, I am very new to the subject of Matlab.

    • @asrafmohamedmoubark
      @asrafmohamedmoubark  8 лет назад

      HI..its ok..dont worry..is it 32 is representing array or channel data? can you be more details? Thank you

  • @dailynewthought3832
    @dailynewthought3832 6 лет назад

    Hi dear ,
    FFT are working in 2^N Data , But how to do calculate MATLAB without 2^N data
    i am face a problem that MATLAB are work without 2^n Data, but i am not able to do this Please Help me

  • @berkk1993
    @berkk1993 6 лет назад

    Where can i get the code in video?

  • @WendyFeGu
    @WendyFeGu 7 лет назад

    Can someone please explain to me why the amplitudes values in the frequency domain do not match the amplitude values in the time domain for y4? To my understanding, the amplitudes values of a signal should match in time and frequency domain, is that correct? I am trying to do this comparison with a signal I am analyzing but I am a little bit confused.

  • @djh-1091
    @djh-1091 8 лет назад

    xdat = 0:5:120;
    ydat = [62,57,56,55,57,56,58,62,62,63,61,61,62,62,62,61,60,60,60,61,65,68,67,66,67];
    scatter(xdat,ydat,'filled')
    set(gca,'xtick',0:5:120)
    grid on
    how to do FFT on that plot?

    • @asrafmohamedmoubark
      @asrafmohamedmoubark  8 лет назад

      +d jh-10
      xdat = 0:5:120;
      ydat = [62,57,56,55,57,56,58,62,62,63,61,61,62,62,62,61,60,60,60,61,65,68,67,66,67];
      plot(xdat,ydat);
      nfft=length(ydat);
      nfft2=2.^nextpow2(nfft); %% convert to length in 2 to power of...
      ffty=fftshift(fft(ydat,nfft2));
      plot(abs(ffty));

    • @djh-1091
      @djh-1091 8 лет назад +1

      +asraf mohamed
      Hi asraf thanks for the quick reply
      your reply code is giving the error message of :
      plot(abs(ffty));

      Error: The input character is not valid in MATLAB statements or expressions.

    • @asrafmohamedmoubark
      @asrafmohamedmoubark  8 лет назад

      please try this:
      r=abs(ffty);
      plot(r);

    • @djh-1091
      @djh-1091 8 лет назад

      +asraf mohamed
      same problem
      xdat = 0:5:120;
      ydat = [62,57,56,55,57,56,58,62,62,63,61,61,62,62,62,61,60,60,60,61,65,68,67,66,67];
      plot(xdat,ydat);
      nfft=length(ydat);
      nfft2=2.^nextpow2(nfft);
      ffty=fftshift(fft(ydat,nfft2));
      r=abs(ffty);
      plot(r);
      plot(r);

      Error: The input character is not valid in MATLAB statements or expressions.
      Just the xdat vs ydat graph is plotted.

    • @asrafmohamedmoubark
      @asrafmohamedmoubark  8 лет назад

      +d jh-10 hi..sorry for late reply..do you still have same problem? please let me know..thank you

  • @aakritisrivastava5089
    @aakritisrivastava5089 5 лет назад

    How nfft becomes 2000 please would u tell me?

  • @fikret8422
    @fikret8422 6 лет назад

    why did you write ff=fft(y4,nfft2); instead of ff=fft(y4,nfft); please explain ı need to get answer please !!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @emmanuelkayode9189
    @emmanuelkayode9189 Год назад

    Can I get the code

  • @virendersingh9377
    @virendersingh9377 7 лет назад

    @asraf Mohamed your laptop mic is picking up sound. That's is why wee a getting your writing pad noise so much. Please make this video again.

  • @cubepain92
    @cubepain92 8 лет назад +1

    Sir, could you help me with my problem ?, I've already resumed it on this link
    dsp.stackexchange.com/questions/35755/how-do-i-get-excatly-the-same-peak-amplitude-versus-frequency-when-performing-ff.

    • @asrafmohamedmoubark
      @asrafmohamedmoubark  8 лет назад

      In your case seems like the signal looks like combination of linear frequency modulation and narrow band signal. Maybe you can try to use spectogram and Z-transform. Best of luck..thank you

  • @luarboll12
    @luarboll12 6 лет назад

    some one know how make this Acos(w*t)cos(w2*t)

  • @siu281
    @siu281 7 лет назад

    Tap tap tap tap tap tap tap

  • @BrutusPalmeira
    @BrutusPalmeira 5 лет назад

    Man that click click click sound is so annoying, maybe a tutorial to create a filter that will remove those click clicks is in order....

  • @smsayeedbinasad7563
    @smsayeedbinasad7563 8 лет назад +1

    Hej Asraf, can I contact you via email? would u give me your email ID? sayeed03@gmail.com is mine ID.

  • @renee3356
    @renee3356 5 лет назад

    The clicking noise is very distracting...

  • @vedatbal152
    @vedatbal152 7 лет назад

    2

  • @raedalotaibi402
    @raedalotaibi402 8 лет назад

    Hey bro I have a signal and I tried to apply fft but i am not sure how its work
    can you please help me with it
    thanks
    this is my email: ra_099_@hotmail.com

  • @joshuas4joryemopido48
    @joshuas4joryemopido48 7 лет назад

    thnx for the video
    i got a problem with maybe u help me with ur email
    myn is joshuaoryems4j@gmail.com from uganda thnk u

  • @lillyzegarra8025
    @lillyzegarra8025 5 лет назад

    Why do you record your screen so small, it is impossible to see clearly. You need to consider the needs of those who watch the video. Stop being so sloppy!

  • @SavageStyle77
    @SavageStyle77 7 лет назад

    how you manage to upload that crap? Dont you hear that terrible click loud sound? Impossible

  • @junkmail4613
    @junkmail4613 7 лет назад

    What the hell is the click click click............... FIX IT DAMN IT>>>> Your voice is too quiet to hear.... I QUIT>