clc;
clear;
close all;
t = 0:0.000001:0.004;
m = input('Enter freq fm');
y = square(2*pi*m*t);
subplot(3,1,1);
plot(t,y);
grid on;
title('Modulating Signal');
n = input('Enter freq of fc');
Eb = input('Enter energy/bit');
x = Eb*sin(2*pi*n*t);
subplot(3,1,2);
plot(t,x);
grid on;
title('Carrier Signal');
z = x.*y;
subplot(3,1,3);
plot(t,z);
grid on;
title('BPSK Modulation');
noise = awgn(z,10);
figure;
scatterplot(noise);
title('Signal Space Diagram of BPSK');
To embed this project on your website, copy the following code and paste it into your website's HTML: