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.

how to recover the bits using matlab

Status
Not open for further replies.

chitra ranganath

Member level 2
Joined
May 15, 2011
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,568
hi can pls somebody help me in solving this doubt
z= 10101010 1 1 0 10101111 0 11111111
here in this i`ve stored some bits with spaces in reg z
the logic is after reading 1st 8 bits i`ll see wat is next bit.
if it is '1' i should get output as previous same 8 bits.
else if bit is '0' i shd get next 8 bits.
so output for this sequence above must be

out= 10101010
10101010
10101010
10101111
11111111
pls help me out
for j=1:1:8
res(j)=zb(j);
end
disp (res);

for i=9:1:nbits
if(zb(i)==' ')
res='\n'
end
if(zb(i+2)=='1')
res(i)=zb(i-12);
elseif(zb(i+9)=='0')
res(i)=zb(i+12);
end
end
disp(res); this is some code i wrote
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top