N=1024;
fs=1024;
t=0:1/fs:(N-1)/fs;
< p>x=sin(200*pi*t);%original waveform
figure
plot(t,x)%%%waveform
p>set(gca,'xlim',[0,0.2],'ylim',[-1.3,1.3])
title('Original waveform')
< p>%Spectrum analysisa=fft(x);
a=abs(a)*2/N;
f=0:fs/ N:(N-1)*fs/N;
figure
plot(f,a)
title('spectrum chart') p>
Time domain diagram after % inverse transformation
b=ifft(a)*N/2;
figure
plot(t,b )
set(gca,'xlim',[0,0.2],'ylim',[-1.3,1.3])
title('Waveform after inverse transformation')< /p>