📄 lfsr.m
字号:
function y = lfsr(c,k,n);% This function generates a sequence of n bits produced by the linear feedback% recurrence relation that is governed by the coefficient vector c.% The initial values of the bits are given by the vector ky=zeros(1,n);kln=length(k);for j=1:n, if j<=kln, y(j)=k(j); else reg=y(j-kln:j-1); y(j)=mod(reg*c',2); end; end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -