📄 gtx.m
字号:
h = uwb_imr(1,1);
h = h(1:50); % select proper channel length to make sure there is no IFI
%-----------------------------------------------------------------------
%basic settings, the same as in file "nTi_tr_uwb_2.m"
sample_time = 1e-10;
Ns = 6; %Ts/Tf
nTp = 10;
nTd = 50;
nTf = 120;
nTs = Ns*nTf;
data_length = 10000;
%-----------------------------------------------------------------------
%generate reference and data pulse in a symbol time Ts, not modulated
[reference,data] = tr_pulse_train(sample_time,nTp,nTd,nTf,Ns);
%-----------------------------------------------------------------------
%small trick for speed
reference = conv(reference,h);
reference = reference(1:nTs);
data = conv(data,h);
data = data(1:nTs);
%-----------------------------------------------------------------------
%random binary source
source = randsrc(1,data_length);
% sourcee = [sourcee,source];
%-----------------------------------------------------------------------
%generate transmitted signal
tx_r = [];
tx_d = [];
for i=1:data_length %n bit
tx_r = [tx_r ; reference];
tx_d = [tx_d ; source(i)*data ]; %modulation
end
tx = tx_r + tx_d; %n bit
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -