I am getting error in qammd function, how to over come this?
2 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(1 个)
Chidvi Modala
2020-4-17
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 OFDM 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!