Recently, because of the needs of the subject, I am studying communication.
I downloaded a code from around 2015 on the Internet, which used the modem.qammod function in the old version of matlab, but the function in the old version has been deleted. Why change the function...)
Then the following situation arises:
How to do it?
Check the source code and find that the functions mainly in this part of the source code have expired.
modemTX = modem.qammod('M', M, 'SymbolOrder', 'gray');
modemTX.InputType = 'bit';
modemRX = modem.qamdemod(modemTX);
The part that handles this part of the variable is this:
data = normCoef*modulate(modemTX, transmittedBits);
......
receivedBitsMMSE = demodulate(modemRX,symbolEstimateMMSE/normCoef);
So I found these two articles on the Internet
Modify according to their instructions, but still report an error, and the array does not match.
Personal suggestion, the most complete modification.
First, comment this part of the code block
% modemTX = modem.qammod('M', M, 'SymbolOrder', 'gray');
% modemTX.InputType = 'bit';
% modemRX = modem.qamdemod(modemTX);
Then, modify the code block that uses the code in this part
data = normCoef*qammod(transmittedBits, M, 'gray', 'InputType','bit');
......
numberOfErrorsFrameMMSE = sum(sum(abs(receivedBitsMMSE-transmittedBits)));
In this way, there is no problem.