ls_time_2x2_code.m

来自「该文件夹为空时块码-卷积码级联系统的仿真程序」· M 代码 · 共 36 行

M
36
字号
function [H1,H2]=ls_time_2x2_code(y,chantype,sampletime)
% Pure time domain maximum likelihood estimation with 1536 subcarriers code
% H1,H2: freq channel response from two Tx to this Rx
% y: received time domain signal on this Rx(column vector)

switch chantype,
    case 1,     % SUI-1 Channel
        tau = [0 0.4 0.9];      % tap delay in us
        load X_pinv_sui1.mat;
    case 2,     % SUI-2 Channel
        tau = [0 0.4 1.1];
        load X_pinv_sui2.mat;
    case 3,     % SUI-3 Channel
        tau = [0.0 0.4 0.9];
        load X_pinv_sui3.mat;
    case 4,     % SUI-4 Channel
        tau = [0 1.5 4];
        load X_pinv_sui4.mat;
    case 5,     % SUI-5 Channel
        tau = [0 4 10];
        load X_pinv_sui5.mat;
    case 6,     % SUI-6 Channel
        tau = [0 14 20];
        load X_pinv_sui6.mat;
    otherwise,
        error('Unrecognized channel model');
end
L=max(round(tau/sampletime))+1;

h=X_pinv*y;
h1=h(1:L).'; h2=h(L+1:end).';

H1=fftshift(fft(h1,2048));
H1(:,1794:2048)=[]; H1(:,1:256)=[];
H2=fftshift(fft(h2,2048));
H2(:,1794:2048)=[]; H2(:,1:256)=[];

⌨️ 快捷键说明

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