Help using randn and pskmod
조회 수: 1 (최근 30일)
이전 댓글 표시
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);
채택된 답변
Wayne King
2012년 3월 26일
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
추가 답변 (1개)
Daniel Shub
2012년 3월 26일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 PSK에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!