我正在尝试编写 8PSK 调制系统,代码如下:
custMap = [0 2 4 6 7 5 3 1];
hChan = comm.AWGNChannel('BitsPerSymbol',log2(8));
hErr = comm.ErrorRate;
% Initialize the simulation vectors. The Eb/No is varied from 0 to 10 dB in
% 1 dB steps.
ebnoVec = 0:10;
for k = 1:length(ebnoVec)
% Set the channel Eb/No
hChan.EbNo = ebnoVec(k);
while errVec(2) < 200 && errVec(3) < 1e7
% Generate a 1000-symbol frame
data = randi([0 1],4000,1);
modData = step(hMod,data);
% Pass the modulated data through the AWGN channel
rxSig = step(hChan,modData);
% Demodulate the received signal
rxData = step(hDemod,rxSig);
end
end
但我在这一行有一个问题:
modData = step(hMod,data);
这是错误: 我该如何解决这个问题,感谢您的帮助