| 1 | clc; |
| 2 | clear all; |
| 3 | close all; |
| 4 | A = 5; |
| 5 | t = 0:0.001:1; |
| 6 | F1 = input ('carrier signal frequency'); |
| 7 | F2 = input ('message signal frequency'); |
| 8 | x = A.*sin(2*pi*F1*t); |
| 9 | u = square(2*pi*F2*t); |
| 10 | y = x.*u; subplot(3,1,1); |
| 11 | plot(t,x); xlabel('t'); |
| 12 | ylabel('x(t)'); |
| 13 | title('modulating signal') |
| 14 | subplot(3,1,2); |
| 15 | plot(t,u); |
| 16 | xlabel('t'); |
| 17 | ylabel('u(t)'); |
| 18 | title('carrier signal') |
| 19 | subplot(3,1,3); |
| 20 | plot(t,y); |
| 21 | xlabel('t'); |
| 22 | ylabel('y(t)'); |
| 23 | title('modulated signal') |
k / Binary Phase Shift Keying
Last active 5 months ago
Revision 2b203c3e2f0d54628875bbfc0d3968eee08707db