You have to transmit Data Sequence 11100010 with transmission bit rate 1000000 through QPSK. Write a Matlab code and a) Generate data sequence and all the above mentioned wave

9 visualizaciones (últimos 30 días)
clear all
close all
Data_Seq=[1,1,1,0,0,0,1,0]
stem(Data_Seq)
bitrate= 1000000;
SR=1/bitrate;
ylim([-1 1])
t=0:0.01:length(Data_Seq)
Data_Seq2=[1,1,1,-1,-1,-1,1,-1]
stem(Data_Seq2)
A = Data_Seq2(1:2:end,:) %
B = Data_Seq2(2:2:end,:)
stem(A)
even = Data_Seq(2:2:end);
odd = Data_Seq(1:2:end);
stem(even)
// i Want to seperate even and odd signal but not undrstanding how to plot

Respuestas (1)

Shashi Kiran
Shashi Kiran el 16 de Sept. de 2024
Hi Ali,
I understand that you want to separate the even and odd components of the data sequence [1, 1, 1, 0, 0, 0, 1, 0] and plot them.
Here is how you can achieve that in MATLAB using stem and subplot functions:
clear;
% Define the data sequence
Data_Seq = [1, 1, 1, 0, 0, 0, 1, 0];
% Plot the original data sequence
figure;
subplot(4, 1, 1);
stem(Data_Seq, 'filled');
title('Original Data Sequence');
xlabel('Bit Index');
ylabel('Bit Value');
ylim([-0.5 1.5]);
% Define parameters
bitrate = 1000000;
SR = 1/bitrate;
% Convert binary data to bipolar format for QPSK
Data_Seq2 = 2*Data_Seq - 1;
% Separate the data into even and odd sequences
even = Data_Seq2(2:2:end); % Even indexed bits
odd = Data_Seq2(1:2:end); % Odd indexed bits
% Plot the bipolar data sequence
subplot(4, 1, 2);
stem(Data_Seq2, 'filled');
title('Bipolar Data Sequence');
xlabel('Bit Index');
ylabel('Amplitude');
ylim([-1.5 1.5]);
% Plot the odd sequence
subplot(4, 1, 3);
stem(odd, 'filled');
title('Odd Indexed Sequence (In-phase I)');
xlabel('Symbol Index');
ylabel('Amplitude');
ylim([-1.5 1.5]);
% Plot the even sequence
subplot(4, 1, 4);
stem(even, 'filled');
title('Even Indexed Sequence (Quadrature Q)');
xlabel('Symbol Index');
ylabel('Amplitude');
ylim([-1.5 1.5]);
Refer to the following documentations for more details about the functions:
  1. subplot: https://www.mathworks.com/help/matlab/ref/subplot.html
  2. stem: https://www.mathworks.com/help/matlab/ref/stem.html
Hope this solves your query.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by