k1 = 2;k2 = 6;delay = 5;
reg = - ones(1,10);
for j = 1 : 1023;
mls(j) = reg(10);
modulo = reg(2) * reg(3) * reg(6) * reg(8) * reg(9) * reg(10);
reg(2:10) = reg(1 : 9);
reg(1) = modulo;
g2(j) = reg(k1) * reg(k2);
end
%g2 mls delay examine
if mls == g2([delay:1023 1:delay-1])
disp('ok')
else
disp('not match')
end
% exchange the '-1' into 0 and '1'into '0' in the g2
ind1 = find(g2 == -1);
ind2 = find(g2 == 1);
g2(ind1) = ones (1,length(ind1));
g2(ind2) = zeros(1,length(ind2));
temp= g2(1:120);
x(1) = 0;show(1) = temp(1);
p = 2;
for i = 2:length(temp)
if((temp(i) == temp(i-1)))
x(p) = i - 1;
show(p) = temp(i - 1);
x(p+1) = i-1+0.5;
show(p + 1) = temp(i);
p = p + 2;
else
show(p) = temp(i);
x(p) = i;
p = p + 1;
end
end
plot(x,show)
axis([0 (length(x)-60) -0.1 1.1]);
grid;
c_a.rar_C/A_C/A码_C/A码 matlab_c_a_产生C/A码 matlab
版权申诉
130 浏览量
2022-09-23
12:21:10
上传
评论
收藏 520B RAR 举报
邓凌佳
- 粉丝: 65
- 资源: 1万+