FFT with correct Amplitude Digital Signal Processing MATLAB
>> YOUR LINK HERE: ___ http://youtube.com/watch?v=CwrhAe6XMLQ
Code: • clc • clear all • close all • t=0:0.01:30; • x=5*sin(2*pi*3*t)+12*sin(2*pi*10*t)+20*sin(2*pi*15*t); • n=rand(1,length(t)); • x=x+n; • subplot(1,2,1); • plot(t,x); • xlabel('Time'); • ylabel('Amplitude'); • title('Time domain signal'); • N=length(x); • y=fft(x,N); • e=y(1:floor(N/2)+1); • Fs=1/0.01; • f=linspace(0,Fs/2,floor(N/2)+1); • subplot(1,2,2); • plot(f,2*abs(e)/N); • xlabel('Frequency'); • ylabel('Amplitude'); • title('Frequency domain signal'); • Prerequisite: • https://www.dspguide.com/ch10/7.htm • #DSP #MATLAB #FFT
#############################
