HDB3 signal to bitstream.

Hello I want to write a function, the input is +, - and 0; the output is bitstream 0, 1.
if input(i)=0 =>bit(i)=0
if (+)(0)(0)(+) or (-)(0)(0)(-)=> bit(i:i+3)=0
if (0)(0)(0)(previously input~=0) => bit(i+3)=0
and elseif others bit~=0 =>bit=1;
Example: input= '+ 0 0 - + 0 0 + 0 - 0 0 0 - + -'
output: 1 0 0 1 0 0 0 0 1 0 0 0 0 1 1
Thank you

Answers (0)

Categories

Find more on Signal Processing Toolbox in Help Center and File Exchange

Tags

Asked:

on 10 Nov 2015

Edited:

on 10 Nov 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!