function [cpx] = bin2_to_cpx(bin, sz)
% Returns a vector of complex numbers whose semantics
% .. are those of the Trellis value for a 2-digit output symbol.
% sz is the length of vector bin.
% 
% D.Bozarth 03-23-08 SSU Engineering Science
%
n_cpx   = floor(sz ./ 2);
cpx     = zeros(1, n_cpx);
ptr     = 0;
ndx     = 0;

for k = 0:(n_cpx - 1)
    ptr         = k * 2 + 1;
    ndx         = ndx + 1;   
    cpx(1, ndx) = complex(bin(1, ptr), bin(1, ptr + 1));
end
% end function