modulation of binary sequence

1 次查看(过去 30 天)
Mohamed Ashraf
Mohamed Ashraf 2018-2-23
I would like to replace the bits of 1s and 0s with the signal made with different phase of 90 degrees
if true
% clear;
clc;
number_bits=4;
sequence=randi([0 1],1,number_bits);
fs=1e4;
f=1e3;
t=0:(1/fs):0.01;
signal=sin(2*pi*f*t);
message=[]
figure;
plot(t,signal);
grid on;
title('Continous wave signal');
for i=1:number_bits
if sequence(i)==0
sig=zeros(1,length(t));
else sig=signal;
end
figure;
plot(t,sig);
grid on;
hold on;
message=[message sig];
end
message
t_message=0:1/fs:0.01*4;
figure
plot(t_message,message)
end

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Numeric Types 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by