Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- M=1000;
- t=[1:M]/M;
- N=generate_N(0,1,M);
- s=sin(2*%pi*10*t);
- U=fft(s+N);
- subplot(1,3,1)
- plot(t,abs(U),'.')
- subplot(1,3,2)
- plot(atan(imag(U)./real(U)),'.')
- subplot(1,3,3)
- plot(real(U),imag(U),'.')
- ///////////////////////////////
- p_0=150;
- U_1=U;
- U_1(abs(U_1)<p_0)=0;
- s_1=ifft(U_1);
- figure;
- subplot(2,1,1);
- plot(s+N);
- subplot(2,1,2);
- plot(s,'r')
- plot(s_1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement