%
% Coded by Rami Mowakeaa (ramo1@umbc.edu)
%
% References:
%
% Mowakeaa, R., Boukouvalas, Z., Adal?, T., & Cavalcante, C. (2016, July). 
%    On the characterization, generation, and efficient estimation of the 
%    complex multivariate GGD. In 2016 IEEE Sensor Array and Multichannel 
%    Signal Processing Workshop (SAM) (pp. 1-5). IEEE.
%
%
function S = GenerateCMGGD(Ca, pbeta, T)
% Ca       : a valid augmented covariance matrix
% pbeta    : shape parameter for source
% T        : number of generated realizations

K = size(Ca, 1);

Cr = MatrixAugmentedToBivariate(Ca);

Sb = generate_MGGD(T, K, Cr, pbeta)';

S = Sb(:, 1:K/2) + 1j*Sb(:, K/2+1:end);

end