• Remix
  • Share
  • New Entry

  • cool

  • /
  • Fourier Transform--the door between time domain and frequency domain

on 27 Oct 2021
  • 2
  • 36
  • 0
  • 0
  • 240
t=1:1000;
y=zeros(1000,20);
y(t<500,1)=1;
y(t>500,1)=-1;
plot3(t,ones(1000,1),y(:,1),'linewidth',3);
hold on;
h=fft(y(:,1))/500;
for m0=1:19
y(:,m0+1)=abs(h(m0*2))*cos((m0*2-1)*t/1000*2*pi+angle(h(m0*2)));
plot3(t,(m0+1)*ones(1000,1),y(:,m0+1));
end
grid minor
Image
Remix Tree