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.
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 ?
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?
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?
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.
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).
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.
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?
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 )
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
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
@@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.
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.
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?
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
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
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".
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.
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 !!!!!
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.
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.
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.
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
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.
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?
+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.
+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.
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.
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
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
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!
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.
Thank you Andria N
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!
Thanks, dude it,s really helpful. i saw a lot of clips but could not get a better solution. thanks again
Very clear explanation, thank you!
Best explanation I found ! Nice job
Thank you. This is superb. I finally get this.
Ah! Now I see why dt=0:Ts:2-Ts;
2000 samples of 1 millisecond, not 2001 samples.
Great video, thanks!
Thank you very much Asraf..! this is very useful for me..Im new with matlab and my research is in motor current signature analysis..
Perfectly Explained...Thanks a lot!
Thank you very much, it's very helpful and easily to understand :)))
JazakAllah, stay Blessed !!
Salam Mohamed, thank you very much it is useful video
Great tutorial! Thanks a lot!
Thank you so much👌
Mr. Eng. Asraf, Fabelhaft, Total Super!, Ich gratuliere!
Simply good👍
Great work!
thank you it was verry helpfull
Thank you very much !!
thanks a lot my friend !
Sincerely, thank you!
hello, this was really a beneficial tutorial.
but can you, please do the same analysis in Simulink
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 ?
ILEGIBLE
Thanks Mohamed
godsend. thank you
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.
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?
I am also confused why we need the next power of 2
I am chinese,english poor.it would be perfect with subtitle!! Anyway ,thanks for your work!!!!
please make a video on Independent Component Analysis and Principal Component Analysis.
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 :) ...
Thanks, Asraf! One question, why to get a good freq resolution we need to have 2^nextpow2()? What is the theoretical reason? Thanks!
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?
Thanks for the video. Why does the FFT work better with an nfft that is a power of 2?
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.
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).
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.
He can delete the sound using FFT in matlab
@@johnc.5600 I concur
Does the matlab's fft returns the Fourier Transform that we can calculate by hand?
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?
Paul-Jasper Sahr hi..thank you for watching..can you post your code here so that i can have a look..cheers
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 )
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
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?
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
hi mate this is useful but if we have got the signals from the sensors how can we get into time and frequency domain?
Hi..by using analog to digital converter (ADC) ..thank you
@@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.
thank you.
use fft on ur video also n remove that pen noise.
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.
how can i get fundamental components of my current and voltage signals?using DFT
Thanks!
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?
because all I see that it does, is that it just doesnt give any values after 2000...
Oh sorry, I think I mightv been wrong on that
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?
Hi, Can you be more details? Thank you
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?
Thanks
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?
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
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
@Dr. Walid Tawfik
same thing struck me. Thnks for asking.
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".
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
Hi..have you declare Ts first? Variable in Matlab should be in order. Thank you
The frequenices should be at 10, 20 and 30. Why are they showing up as much higher values ~500?
Nevermind I watched your next video and everything was made clear! Thanks a lot you're a great teacher :)
Thanks.
are we able to do the same thing but with C language? I cant really find any working code using C.
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.
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
thank you
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 !!!!!
Fs should be at least 1000khz in your case..you can set also to 2000khz..5000khz..and so on
ok thanks.
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?
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.
Thank you for the fast reply and your videos!!!
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.
Sadiq Ibn Abubakr hi..you can declare any variable name as your output
Sadiq Ibn Abubakr hi..you can declare any variable name as your output
How can I plot the right amplitude?
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.
HI..its ok..dont worry..is it 32 is representing array or channel data? can you be more details? Thank you
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
Where can i get the code in video?
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.
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?
+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));
+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.
please try this:
r=abs(ffty);
plot(r);
+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.
+d jh-10 hi..sorry for late reply..do you still have same problem? please let me know..thank you
How nfft becomes 2000 please would u tell me?
why did you write ff=fft(y4,nfft2); instead of ff=fft(y4,nfft); please explain ı need to get answer please !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Can I get the code
@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.
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.
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
some one know how make this Acos(w*t)cos(w2*t)
Tap tap tap tap tap tap tap
Ruben Pereira thank you
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....
Hej Asraf, can I contact you via email? would u give me your email ID? sayeed03@gmail.com is mine ID.
The clicking noise is very distracting...
2
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
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
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!
how you manage to upload that crap? Dont you hear that terrible click loud sound? Impossible
What the hell is the click click click............... FIX IT DAMN IT>>>> Your voice is too quiet to hear.... I QUIT>