www.pudn.com > RS_BCM_255_223_4[1].Matlab.rar > encode_81.m, change:2007-04-14,size:310b


%(8,1)
function [output] = encode_81(input)
n=length(input);
if input(1)==0
        output=zeros(1,8);
elseif  input(1)==1
        output=ones(1,8);
end

for i=2:n
    if input(i)==0
        output=[output zeros(1,8)];
    elseif  input(i)==1
        output=[output ones(1,8)];
    end
end