Help using randn and pskmod
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have taken random data using randn and then psk modulated it...But i get error.
M=1024;
m=4;
msg1=randn(M,1,m);
msg2=randn(M,1,m);
msg=vertcat(msg1,msg2);
% QPSK modulation
qpsk_modulated_data1=pskmod(msg1,m);
qpsk_modulated_data2=pskmod(msg2,m);
2 Kommentare
Akzeptierte Antwort
Wayne King
am 26 Mär. 2012
You want to generate your data using randi() like this:
M = 4;
msg1 = randi([0, 3],1024,1);
qpsk_modulated_data1 = pskmod(msg1,M);
8 Kommentare
Weitere Antworten (1)
Daniel Shub
am 26 Mär. 2012
You realize that
randn(M,1,m)
is not going to produce integers in the range [0, m-1]? Maybe you want
doc randi
0 Kommentare
Siehe auch
Kategorien
Mehr zu PSK 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!