thseq.asv
来自「超宽带多用户系统仿真,误码率仿真,内容很好」· ASV 代码 · 共 26 行
ASV
26 行
function THseq=THseq(bits,fc,Tc,Ts,THcode)
% --------------------------------------------------
% Step One - Implementation of the 2PPM-TH modulator
% --------------------------------------------------
%产生信号序列
dt = 1 ./ fc; % sampling period
framesamples = floor(Ts./dt); % no. of samples between
chipsamples = floor (Tc./dt); % no. of samples for t
THp = length(THcode); % TH-code periodicity
totlength = framesamples*length(bits);
THseq=zeros(1,totlength);
% ------------------------------------------------
for k = 1 : length(bits)
% uniform pulse position
index = 1 + (k-1)*framesamples;
% introduction of TH
kTH = THcode(1+mod(k-1,THp));
index = index + kTH*chipsamples;
THseq(index) = 1;
end % for k = 1 : length(seq)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?