function [bin] = cpx_to_bin2(cpx, sz)
% Returns a vector of bit values matching
% .. the supplied vector of complex numbers whose semantics
% .. are those of the Trellis value for a 2-digit output symbol.
% sz is the length of vector cpx.
% 
% D.Bozarth 03-23-08 SSU Engineering Science
%
n_bin   = 2 * sz;
bin     = zeros(1, n_bin);
ptr     = 0;

for k = 0:(sz - 1)  % Each complex value.
    sym             = cpx(1, k + 1);
    ptr             = k * 2 + 1;
    bin(1, ptr)     = real(sym);
    bin(1, ptr + 1) = imag(sym);
end
% end function