• 大小: 3KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-14
  • 语言: Matlab
  • 标签: MATLAB  16QAM  64QAM  

资源简介

之前通信仿真课写的,曲线还蛮平滑。MATLAB仿真AWGN信道中,16QAM和64QAM在不同信噪比下的误码率比较。

资源截图

代码片段和文件信息

function [redata1]=demoduQ16(Receive16RealReceive16ImagN)%demodulation 函数
    data1demod1 = zeros(1N);
    data1demod2 = zeros(1N);
    data1demod3 = zeros(1N);
    data1demod4 = zeros(1N);
    redata1=zeros(14*N);
    for k = 1:N
        if Receive16Real(k)>2 
            data1demod1(k) = 0;
            data1demod2(k) = 0;
            if Receive16Imag(k)>2
                data1demod3(k) = 0;
                data1demod4(k) = 0;
            elseif Receive16Imag(k)>0 && Receive16Imag(k)<2
                data1demod3(k) = 0;
                data1demod4(k) = 1;
            elseif Receive16Imag(k)>-2 && Receive16Imag(k)<0
                data1demod3(k) = 1;
                data1demod4(k) = 1;
            elseif Receive16Imag(k)<-2
                data1demod3(k) = 1;
                data1demod4(k) = 0;
            end
        elseif Receive16Real(k)>0 && Receive16Real(k)<2
            data1demod1(k) = 0;
            data1demod2(k) = 1;
            if Receive16Imag(k)>2
                data1demod3(k) = 0;
                data1demod4(k) = 0;
            elseif Receive16Imag(k)>0 && Receive16Imag(k)<2
                data1demod3(k) = 0;
                data1demod4(k) = 1;
            elseif Receive16Imag(k)>-2 &&Receive16Imag(k)<0
                data1demod3(k) = 1;
                data1demod4(k) = 1;
            elseif Receive16Imag(k)<-2
                data1demod3(k) = 1;
                data1demod4(k) = 0;
            end
        elseif Receive16Real(k)<0 && Receive16Real(k)>-2
            data1demod1(k) = 1;
            data1demod2(k) = 1;
            if Receive16Imag(k)>2
                data1demod3(k) = 0;
                data1demod4(k) = 0;
            elseif Receive16Imag(k)>0 && Receive16Imag(k)<2
                data1demod3(k) = 0;
                data1demod4(k) = 1;
            elseif Receive16Imag(k)>-2 && Receive16Imag(k)<0
                data1demod3(k) = 1;
                data1demod4(k) = 1;
            elseif Receive16Imag(k)<-2
                data1demod3(k) = 1;
                data1demod4(k) = 0;
            end
        elseif Receive16Real(k)<-2
            data1demod1(k) = 1;
            data1demod2(k) = 0;
            if Receive16Imag(k)>2
                data1demod3(k) = 0;
                data1demod4(k) = 0;
            elseif Receive16Imag(k)>0 && Receive16Imag(k)<2
                data1demod3(k) = 0;
                data1demod4(k) = 1;
            elseif Receive16Imag(k)>-2 && Receive16Imag(k)<0
                data1demod3(k) = 1;
                data1demod4(k) = 1;
            elseif Receive16Imag(k)<-2
                data1demod3(k) = 1;
                data1demod4(k) = 0;
            end
        end
        redata1(4*k-3)=data1demod1(k);
        redata1(4*k-2)=data1demod2(k);
        redata1(4*k-1)=data1demod3(k);
        redata1(4*k)=data1demod4(k);
    end

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        1223  2019-01-12 18:29  QAM\Qam1.m
     文件        2915  2018-12-01 00:14  QAM\demoduQ16.m
     文件       12741  2018-12-01 00:14  QAM\demoduQ64.m
     文件        2117  2018-11-30 23:47  QAM\moduQ16.m
     文件        7253  2018-11-30 23:47  QAM\moduQ64.m
     目录           0  2019-04-19 22:34  QAM\

评论

共有 条评论