Advertisement
SubhamRath

FM_wave

Nov 30th, 2020
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.74 KB | None | 0 0
  1. clc ;
  2. clear all;
  3. close all;
  4. t=0:0.000001:0.1;
  5. Am=1;
  6. Ac=2;
  7. fm=50;
  8. fc=1000;
  9. b=50;
  10. k=10000;
  11. %ploting baseband signal
  12. x=Am*cos(2*pi*fm*t);
  13. subplot(4,1,1);
  14. plot(t,x)
  15. xlabel('Time');
  16. ylabel('Amplitude');
  17. grid on;
  18. title('Baseband signal');
  19. %carrier signal
  20. y=Ac*cos(2*pi*fc*t);
  21. subplot(4,1,2);
  22. plot(t,y)
  23. xlabel('Time');
  24. ylabel('Amplitude');
  25. grid on;
  26. title('Carrier signal');
  27. %FM signal
  28. z=Ac*cos((2*pi*fc*t)+(Am*b*sin(2*pi*fm*t)));
  29. subplot(4,1,3);
  30. plot(t,z)
  31. xlabel('Time');
  32. ylabel('Amplitude');
  33. grid on;
  34. title('Baseband signal');
  35. %Narrow band FM
  36. %FM signal
  37. r=Ac*cos(2*pi*fc*t)-Ac*k*((Am/2*pi*fm)*sin(2*pi*fm*t)).*sin(2*pi*fc*t)
  38. subplot(4,1,4);
  39. plot(t,r)
  40. xlabel('Time');
  41. ylabel('Amplitude');
  42. grid on;
  43. title('Baseband signal');
  44.  
  45.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement