⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makesignal.m

📁 OFDM的PHY发射端matlab实现程序
💻 M
字号:
function Signal=makesignal(Ratein,reservebit,Length)
%Generate the Signal
switch Ratein
    case 6
        rate=[1 1 0 1];
    case 9
        rate=[1 1 1 1];
    case 12
        rate=[0 1 0 1];
    case 18
        rate=[0 1 1 1];
    case 24
        rate=[1 0 0 1];
    case 36
        rate=[1 0 1 1];
    case 48
        rate=[0 0 0 1];
    case 54
        rate=[0 0 1 1];
    otherwise 
        rate=[0 0 0 0];
end
paritycalcu=sum([rate reservebit Length]);    %Generate the paritybit
% odd parity
if mod(paritycalcu,2)==0
    paritybit=[0];
else
    paritybit=[1];
end
Tail=zeros(1,6);
Signal=struct('Rate',rate,'Reservebit',reservebit,'Length',Length,'Paritybit',paritybit,'Tail',Tail);

⌨️ 快捷键说明

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