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

2 visualizaciones (últimos 30 días)
Vishwaraj Manur
Vishwaraj Manur el 14 de Abr. de 2020
Respondida: Chidvi Modala el 17 de Abr. de 2020
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?

Respuestas (1)

Chidvi Modala
Chidvi Modala el 17 de Abr. de 2020
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.

Community Treasure Hunt

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

Start Hunting!

Translated by