Advertisement
albert828

Zaszumianie sygnału

Nov 9th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.47 KB | None | 0 0
  1. %Dane wejsciowe:
  2. T=2;
  3. N=1000;                     %czas trwania sygnalu
  4. krok_t=T/N;                 %okres probkowania
  5. t=0:krok_t:T-krok_t;        %wektor chwil czasow probkowania
  6. a=2;                        %dekrement tlumienia
  7. e=exp(-a*t);
  8. A=17;
  9. f=10;
  10. x_s=A*sin(2*pi*f*t);
  11. %x_s=square(2*pi*f*t);
  12. %zaszumianie sygnalu szumem gaussowskim
  13. y=x_s.*e;
  14. y=y+1*randn(1,length(y));
  15. subplot(3,1,1);
  16. plot(t,e);
  17. subplot(3,1,2);
  18. plot(t,x_s);
  19. subplot(3,1,3);
  20. plot(t,y);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement