需要帮助使用 PSKMOD
Need help using PSKMOD
M = 2; %Modulation order
imdata = imread('http://openvip.sourceforge.net/userdoc/lena_grayscale.jpg');
bdata = de2bi(imdata);
sizec = size(bdata,1);
sizer = size(bdata,2);
nbits = sizec*sizer;
msg = reshape(bdata,nbits,1);
txpsk = pskmod(msg,M);
以上代码提供以下内容errors.need 帮助修复以下错误
??? Error using ==> mtimes
Complex integer arithmetic is not supported.
Error in ==> pskmod at 101
y = exp(j*(theta + ini_phase));
只需将 msg = reshape(bdata,nbits,1)
行更改为 msg = double(reshape(bdata,nbits,1));
即可。它会工作。如果您需要更多说明,请问我,我会为您解释。
M = 2; %Modulation order
imdata = imread('http://openvip.sourceforge.net/userdoc/lena_grayscale.jpg');
bdata = de2bi(imdata);
sizec = size(bdata,1);
sizer = size(bdata,2);
nbits = sizec*sizer;
msg = reshape(bdata,nbits,1);
txpsk = pskmod(msg,M);
以上代码提供以下内容errors.need 帮助修复以下错误
??? Error using ==> mtimes
Complex integer arithmetic is not supported.
Error in ==> pskmod at 101
y = exp(j*(theta + ini_phase));
只需将 msg = reshape(bdata,nbits,1)
行更改为 msg = double(reshape(bdata,nbits,1));
即可。它会工作。如果您需要更多说明,请问我,我会为您解释。