bpsk.m
· 432 B · Mathematica
Raw
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; 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') |