0
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);

上面的代码给出了以下错误。需要帮助修复以下错误

??? Error using ==> mtimes
Complex integer arithmetic is not supported.

Error in ==> pskmod at 101
y = exp(j*(theta + ini_phase));
4

1 回答 1

0

只需将行更改 msg = reshape(bdata,nbits,1)msg = double(reshape(bdata,nbits,1)); . 它会起作用的。如果您需要更多说明,请询问我,我会向您解释。

于 2015-04-10T05:36:52.613 回答