Last active 1 month ago

krolyxon revised this gist 1 month ago. Go to revision

1 file changed, 23 insertions, 1 deletion

bpsk.m

@@ -1 +1,23 @@
1 - clc; clear all; close all; A = 5; t = 0:0.001:1; F1 = input ('carrier signal frequency'); F2 = input ('message signal frequency'); x = A.*sin(2*pi*F1*t); u = square(2*pi*F2*t); y = x.*u; subplot(3,1,1); plot(t,x); xlabel('t'); ylabel('x(t)'); title('modulating signal') subplot(3,1,2); plot(t,u); xlabel('t'); ylabel('u(t)'); title('carrier signal') subplot(3,1,3); plot(t,y); xlabel('t'); ylabel('y(t)'); title('modulated signal')
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')

krolyxon revised this gist 1 month ago. Go to revision

1 file changed, 1 insertion

bpsk.m(file created)

@@ -0,0 +1 @@
1 + clc; clear all; close all; A = 5; t = 0:0.001:1; F1 = input ('carrier signal frequency'); F2 = input ('message signal frequency'); x = A.*sin(2*pi*F1*t); u = square(2*pi*F2*t); y = x.*u; subplot(3,1,1); plot(t,x); xlabel('t'); ylabel('x(t)'); title('modulating signal') subplot(3,1,2); plot(t,u); xlabel('t'); ylabel('u(t)'); title('carrier signal') subplot(3,1,3); plot(t,y); xlabel('t'); ylabel('y(t)'); title('modulated signal')
Newer Older