_Mizanur

fredemod

Oct 30th, 2021
1,157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.61 KB | None | 0 0
  1. clc;
  2. clear all;
  3. close all;
  4. t=[0:0.001:2];
  5. fm=5;
  6. fc=100;
  7. m=cos(2*pi*fm*t);
  8. subplot(4,1,1);
  9. plot(t,m);
  10. title('Message Signal');
  11. xlabel('Time');
  12. ylabel('Amplitude');
  13. c=sin(2*pi*fc*t);
  14. subplot(4,1,2);
  15. plot(t,c);
  16. title('Carrier Signal');
  17. xlabel('Time');
  18. ylabel('Amplitude');
  19. mf=15;
  20. fm=sin((2*pi*fc*t)+mf.*sin(2*pi*fm*t));
  21. subplot(4,1,3);
  22. plot(t,fm);
  23. title('Frequency Modulated Signal');
  24. xlabel('Time');
  25. ylabel('Amplitude');
  26. x=diff(fm);
  27. z=abs(x);
  28. [b,a]=butter(10,0.056);
  29. output=filter(b,a,z);
  30. subplot(4,1,4);
  31. plot(output);
  32. title('Frequency de-Modulated Signal');
  33. xlabel('Time');
  34. ylabel('Amplitude');
  35.  
Advertisement
Add Comment
Please, Sign In to add comment