could anyone help me please?

2 views (last 30 days)
Mahra Albadi
Mahra Albadi on 24 Nov 2021
Commented: Rik on 24 Nov 2021
clc; clear all ;close all;
close all;
data_size=8;
data=randi([0 1],data_size,1);data=data';
bp=0.000001;
disp('Binary information at transmitter :');
disp(data);
% repr of trans binary info as digital
expand=100;
baseband=zeros(1,length(data)*expand);
for n=1:1:length(data)
if data(n)==1
se=ones(expand,1);
else
data(n)=0;
se=zeros(expand,1);
end
baseband((n-1)*expand+1:n*expand)=se;
end
figure
t_bits=bp/expand:bp/expand:expand*length(data)*(bp/expand);
subplot(2,1,1);
plot(t_bits,baseband,'LineWidth',2.5);grid on;
axis([ 0 bp*length(data) -.5 1.5]);
ylabel('amplitude(volt)');
xlabel(' time(sec)');
title([' transmitting informationas digital signal']);
hold on
  12 Comments
per isakson
per isakson on 24 Nov 2021
Edited: per isakson on 24 Nov 2021
See Binary Amplitude Shift Keying. Is it something like this you are looking for? Remember, we are hesitant to do homework.
Rik
Rik on 24 Nov 2021
Comment posted as flag by @Mahra Albadi:
they need to change the amplitude 0 to 0.25 and 1 to 0.75

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!