フィルターのクリア

modulation of binary sequence

3 ビュー (過去 30 日間)
Mohamed Ashraf
Mohamed Ashraf 2018 年 2 月 23 日
編集済み: 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 Center および File ExchangeWaveform Generation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by