function [enc_comp] = cm_dpske(E,M,mapping,sequence);
% [enc_comp] = cm_dpske(E,M,mapping,sequence)
% CM_DPSKE differentially encodes a sequence.
% E is the average energy, M is the number of constellation points,
% and mapping is the vector defining how the constellation points are
% allocated. Finally, ``sequence'' is the uncoded binary data sequence.
% If N is not divisible by k, append zeros, so that it is...
theta=0; % Initially, assume that theta=0.