ip_09_05.m

来自「扩频通信系统」· M 代码 · 共 17 行

M
17
字号
% MATLAB script for Illustrative Problem 9.5.
echo on
% First determine the maximal length shift-register sequences.
% Assume the initial shift-register content as "00001".
connections1=[1 0 1 0 0];
connections2=[1 1 1 0 1];
sequence1=ss_mlsrs(connections1);
sequence2=ss_mlsrs(connections2);
% Cyclically shift the second sequence and add it to the first one.
L=2^length(connections1)-1;
for shift_amount=0:L-1,
  temp=[sequence2(shift_amount+1:L) sequence2(1:shift_amount)];
  gold_seq(shift_amount+1,:)=(sequence1+temp) - floor((sequence1+temp)./2).*2;
  echo off ;
end;
echo on ;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?