MATLAB: Whats this line do

fftmatrixmatrix manipulationplotzeros

y=[zeros(10,20000),x,zeros(10,20000)];
y2=abs(fftshift(fft(real(y(2,:)))))/length(y);
thanks!!!

Best Answer

  • It defines y as x padded with 20000 columns on both sides
  • It takes the DFT of the real part of the second row of y, shifts it to 0 takes the absolute value and divides by the length of the row.