I am getting error in qammd function, how to over come this?
2 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Chidvi Modala
on 17 Apr 2020
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 Comments
See Also
Categories
Find more on OFDM in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!