function x=det_QPSK(I,Q) % x=det_QPSK(I,Q,modulation) % % QPSK detection % I,Q : input symbols % x : output bit stream % I,Q,x are column vectors. i=sqrt(-1); [m,n]=size(I); if n~=1 error('Input vector I should be a column.'); end [m,n]=size(Q); if n~=1 error('Input vector Q should be a column.'); end x= kron(I<0,[1 0].') + kron(Q<0,[0 1].');