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

📄 encoder.m

📁 OFDM信号的循环谱密度
💻 M
字号:
function output = encoder(input,TXVECTOR,SIGNAL_FLAG)
% convolutional encoder
% input: row vector of SIGNAL field or DATA field
% TXVECTOR: structure of TXVECTOR parameters
% SIGNAL_FLAG: indicator of SIGNAL field
% output: row vector of encoded SIGNAL field or DATA field

if nargin == 2 % encoding DATA field
    rate = TXVECTOR.DATARATE;
else % encoding SIGNAL field
    rate = 6;
end;

trellis = poly2trellis(7,[133,171]); % trellis structure

switch rate
    case 6
        output = convenc(input,trellis); % convolutional encoding
    case 12
        %%puncpat = [1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,0,1]; % puncture pattern
        %%output = convenc(input,trellis,puncpat); % convolutional encoding
        output = convenc(input,trellis); % convolutional encoding
    otherwise
        error('parameter not supported');
end;

⌨️ 快捷键说明

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