training_ds.m
来自「超宽带系统链路matlab仿真程序 超宽带系统简单仿真平台」· M 代码 · 共 30 行
M
30 行
function output=training_ds(train_l,input)
%该程序将输入序列扩频后在其前面加入了训练序列
%train_l: the length of training series
%pn : pn code
%input : information data
input=2*input-1;
if train_l<=0
error('Error,train_l is not of the right size.')
end
if length(input)~=1*5
%error('Error,length of input is not of the right size.')
end
pn=[1 1 1 1 1 -1 -1 1 1 -1 1 -1 1];
xt=[1 -1];
if rem(train_l,2)>0
temp=xt'*ones(1,train_l/2-1);
training=reshape(temp,1,train_l-1);
training=[training,1];
else
temp=xt'*ones(1,train_l/2);
training=reshape(temp,1,train_l);
end
temp=pn'*input;
data=reshape(temp,1,length(input)*length(pn));
output=[training,data];
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?