I am getting error in qammd function, how to over come this?

조회 수: 2 (최근 30일)
Vishwaraj Manur
Vishwaraj Manur 2020년 4월 14일
답변: Chidvi Modala 2020년 4월 17일
M=16;
N=1024;
r=1/2;
FN=40;
generte_data=randi([0 1]), N/4*r*FN,1)
trel_code=poly2trellis(7,[171 133]]);
Coded_Data=cpnvenc(generte_data,trel_code);
QAMmod=reshape(Coded_Data,N/4,FN);
data=bi2de(QAMmod);
QAMmod1=qammod(data,M);
I am getting error like,
Error using qammd
Expected input number 1, X, to be be an array with all the values < 16
How to oercome this error?

답변 (1개)

Chidvi Modala
Chidvi Modala 2020년 4월 17일
I assume cpnvenc is actually convenc function.
qammod(data,M) modulates input signal data by using QAM with the specified modulation order M, where data must be binary values or integers that range from 0 to (M – 1). But in the provided code, QAMmod variable is a 256*40 double vector. After converting this to decimal vector, the decimal value of data variable ranges from 0 to 2^40-1. And hence the input signal data is not satisfying the condition of being in the range from 0 to 15.

카테고리

Help CenterFile Exchange에서 QAM에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by