PseudoNoise Sequence Generator
PN sequence generation - Maximum-length sequence generator
Program to generate Maximum Length Pseudo Noise Sequence
//PN sequence generation
//Maximum-length sequence generator
//Program to generate Maximum Length Pseudo Noise Sequence
clc;
//Assign Initial value for PN generator
x0= 1;
x1= 0;
x2 =0;
x3 =0;
N = input('Enter the period of the signal')
for i =1:N
x3 =x2;
x2 =x1;
x1 = x0;
x0 =xor(x1,x3);
disp(i,'The PN sequence at step')
x = [x1 x2 x3];
disp(x,'x=')
end
m = [7,8,9,10,11,12,13,17,19];
N = 2^m-1;
disp('Table Range of PN Sequence lengths')
disp('_________________________________________________________')
disp('Length of shift register (m)')
disp(m)
disp('PN sequence Length (N)')
disp(N)
disp('_________________________________________________________')