Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Scrambler/Descrambler in MATLAB

Status
Not open for further replies.

esto1990

Newbie level 2
Joined
Oct 3, 2014
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
25
Hello,

Im trying to implement 802.11 scrambler/descrambler in matlab. Based on the standard, it should look sth like this:

Bez tytułu.png

My code looks like this

Code:
data=zeros(1,7); %data
register=[1 0 1 1 1 0 1]; %initial state

for i=1:7
   temp=xor(register(1),register(4)); % x7 and x4 xor 
   out(8-i,1)=xor(data(8-i,1),temp); %output bit
   register=circshift(register',-1,1)'; %shift left
   register(7)=data(8-i,1); %insert data to register
end

When im trying to descramble data, with same code and same initial state it gives wrong results.

What am i doing wrong??

Is there any way to guess or estimate initial state at the receiver side??


Best,
Ernest
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top