📄 qam16.m
字号:
function synconst=QAM16(voltlev16)
%-----------------------------------------------------------
%this function maps a voltage level to a symbol
%residing in the 16 QAM Gray coded constellation
%this function is the reverse of the
%function revsymQAM16
%Author: 王博
%Filename: QAM16.m
%-------------------------------------------------------------------
d=1;
if voltlev16==-15; %x==[0 0 0 0]
synconst=-1*d+-1*i*d;
elseif voltlev16==-13; %x==[0 0 0 1]
synconst=-1*d+-3*i*d;
elseif voltlev16==-11; %x==[0 0 1 0]
synconst=-3*d+-1*i*d;
elseif voltlev16==-9; %x==[0 0 1 1]
synconst=-3*d+-3*i*d;
elseif voltlev16==-7; %x==[0 1 0 0]
synconst=d+-1*i*d;
elseif voltlev16==-5; %x==[0 1 0 1]
synconst=d+-3*i*d;
elseif voltlev16==-3; %x==[0 1 1 0]
synconst=3*d+-1*i*d;
elseif voltlev16==-1; %x==[0 1 1 1]
synconst=3*d+-3*i*d;
elseif voltlev16==1; %x==[1 0 0 0]
synconst=-1*d+i*d;
elseif voltlev16==3; %x==[1 0 0 1]
synconst=-1*d+3*i*d;
elseif voltlev16==5; %x==[1 0 1 0]
synconst=-3*d+i*d;
elseif voltlev16==7; %x==[1 0 1 1]
synconst=-3*d+3*i*d;
elseif voltlev16==9; %x==[1 1 0 0]
synconst=d+i*d;
elseif voltlev16==11; %x==[1 1 0 1]
synconst=3*d+i*d;
elseif voltlev16==-13; %x==[1 1 1 0]
synconst=d+3*i*d;
else
synconst=3*d+3*i*d; %x==[1 1 1 1]
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -