function ut = s_1(n,i)
t = -5:0.01:20;
if n == 1
ut = stepfun(t,i-1)-stepfun(t,i);
else
ut = stepfun(t,i-1)-stepfun(t,i-1);
end
end
单极性归零
function ut = s_0(n,i)
t = -5:0.01:20;
if n == 1
ut = stepfun(t,i-1)-stepfun(t,i-0.8);
else
ut = stepfun(t,i-1)-stepfun(t,i-1);
end
end
双极性非归零
function ut = d_1(n,i)
t = -5:0.01:20;
if n == 1
ut = stepfun(t,i-1)-stepfun(t,i);
else
ut = -(stepfun(t,i-1)-stepfun(t,i));
end
end
双极性归零
function ut = d_0(n,i)
t = -5:0.01:20;
if n == 1
ut = stepfun(t,i-1)-stepfun(t,i-0.8);
else
ut = -(stepfun(t,i-1)-stepfun(t,i-0.8));
end
end
传号差分码
function [ut,state] = c_c(n,i,form_state)
t = -5:0.01:20;
if i == 1
if n == 1
ut = stepfun(t,i-1)-stepfun(t,i);
state = 1;
else
ut = stepfun(t,i-1)-stepfun(t,i-1);
state = 0;
end
else
if n == 1
if form_state == 1
ut = stepfun(t,i-1)-stepfun(t,i-1);
state = 0;
else