qam4_64.m

来自「本程序是QAM的调制程序」· M 代码 · 共 33 行

M
33
字号
%产生QAM信号
function y = QAM4_64(n);
% n=2;
M=2^n; %信号的元数
switch n
    case  2  
        x = randint(5000,1,M); % Message signal
        y = qammod(x,M);
        scatterplot(y);
    case  3  
        x = randint(5000,1,M); % Message signal
        y = qammod(x,M);
        scatterplot(y); 
   case  4 
        x = randint(5000,1,M); % Message signal
        y = qammod(x,M);
        scatterplot(y);
    case  5  
        x = randint(5000,1,M); % Message signal
        y = qammod(x,M);
        scatterplot(y); 
    case  6 
        x = randint(5000,1,M); % Message signal
        y = qammod(x,M);
        scatterplot(y);  
%     otherwise  
%         disp('M不在我们研究的范围');
end;
           
            
% x = randint(5000,1,M); % Message signal
% y4QAM = qammod(x,M);
% scatterplot(y4QAM);

⌨️ 快捷键说明

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