Raised Cosine Filter in Matlab
    5 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Nathan Jaqua
 am 15 Mär. 2020
  
    
    
    
    
    Beantwortet: Sriram Tadavarty
    
 am 15 Mär. 2020
             We are designing a raised cosine filter in Matlab. I have developed most of the logic for BPSK Transmitter but  I could use a little help with finishing it out. Not really sure how to plot this in stem or in scatterplot.
close all; clear all;
% Design BPSK transmitter with the random data bits. 
M =  5;           % Modulation levels (Binary PSK)
k = log2(M);     % number of bits per symbol
N = 2e3;         % total number of random bits
sps = 4;         % number of samples per symbol
EbN0 = 10;       % Eb/N0 level in dB
iBits = rand(N, 1) > 0.5;     % generate random bits
bits = 2*iBits - 1;    % convert modulation symbols
% plot first fifty bits.
figure;
stem(    ); grid on; 
title('Random bits'); xlabel('samples'); ylabel('amplitude');
% Attach the plot here…
% plot constellation diagram
scatterplot(  ,1,0,'*r');grid on; 
% Attach the plot here…
1 Kommentar
Akzeptierte Antwort
  Sriram Tadavarty
    
 am 15 Mär. 2020
        Hi Nathan,
Access the vector bits from 1 to 50 elements and pass as the first argument of stem function.
Then, pass the bits directly to scatterplot.
So, the above code will be as below:
close all; clear all;
% Design BPSK transmitter with the random data bits. 
M =  5;           % Modulation levels (Binary PSK)
k = log2(M);     % number of bits per symbol
N = 2e3;         % total number of random bits
sps = 4;         % number of samples per symbol
EbN0 = 10;       % Eb/N0 level in dB
iBits = rand(N, 1) > 0.5;     % generate random bits
bits = 2*iBits - 1;    % convert modulation symbols
% plot first fifty bits.
figure;
stem(bits(1:50)); grid on; 
title('Random bits'); xlabel('samples'); ylabel('amplitude');
% Attach the plot here…
% plot constellation diagram
scatterplot( bits ,1,0,'*r');grid on; 
% Attach the plot here…
For more reference about usage of stem and scatterplot functions, go through these links:
Hope this helps.
Regards,
Sriram
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu BPSK finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


