全文预览

16QAM-星形与矩形星座图调制解调MATLAB代码

上传者:你的雨天 |  格式:doc  |  页数:7 |  大小:41KB

文档介绍
ec=reshape(binary,4,data_len/4)';%转化为data_len/4行,4列,的矩阵,以便转化为16进制data_str=num2str(binary_rec);data_dec=bin2dec(data_str);data_mm16=(floor(data_dec/8)+1).*exp(j*45/180*pi*mod(data_dec,8));data_m16=reshape(data_mm16,1,data_len/4);%------------------------------------------------------------------------------%%星形16QAM解调functiondata_bit=StarQamDemod(qam_rev)%qam_rev=xing_qam16_noise(1:10);am=abs(qam_rev);%幅度判定am(find(am>2))=2;%幅度大于2的判定为2am(find(am<1.5))=1;%幅度大于2的判定为2%相位判定ang=angle(qam_rev)/pi*180;%将-180度到0度变为180度到360度ang(find(ang<0))=ang(find(ang<0))+360;ang_n=round(ang/45);ang_n(find(ang_n>7))=0;data_dec=8*(round(am)-1)+ang_n;%data_dec(find(data_dec>15))=15;%大于15的判定为15%data_dec(find(data_dec<0))=0;%小于0的判定为0data_bit_rec=dec2bin(data_dec);data_bit=reshape(data_bit_rec',1,length(qam_rev)*4)-'0';

收藏

分享

举报
下载此文档