psk_16_gray.m

来自「通信系统中的最新的分块差分调制技术的源码」· M 代码 · 共 35 行

M
35
字号
function [a]=psk_16_gray(theta)
if  theta<pi/16|theta>31*pi/16
    bitp=[0 0 0 0];
elseif theta<pi*3/16
    bitp=[0 0 0 1];
elseif theta<pi*5/16
    bitp=[0 0 1 1];
elseif theta<pi*7/16
    bitp=[0 0 1 0];
elseif theta<pi*9/16
    bitp=[0 1 1 0];
elseif theta<pi*11/16
    bitp=[0 1 1 1];
elseif theta<pi*13/16
    bitp=[0 1 0 1];
elseif theta<pi*15/16
    bitp=[0 1 0 0];  
elseif theta<pi*17/16
    bitp=[1 1 0 0];
elseif theta<pi*19/16
    bitp=[1 1 0 1]; 
elseif theta<pi*21/16
    bitp=[1 1 1 1]; 
elseif theta<pi*23/16
    bitp=[1 1 1 0];
elseif theta<pi*25/16
    bitp=[1 0 1 0];
elseif theta<pi*27/16
    bitp=[1 0 1 1]; 
elseif theta<pi*29/16
    bitp=[1 0 0 1]; 
else
    bitp=[1 0 0 0]; 
end
a=bitp;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?