Contents

function I = compute_mutual_info(C, N0)
% Computes the mutual information for AWGN channel (spectral density N0)
% with discrete input constellation C

Computing mutual information

$$I(X;Y)=H(Y)-H(Y \mid X) = H(Y)-H(Z)$$

$$ Y \sim Gaussian Mixture$$

r.v. Y is the output of AWGN channel with discrete input and therefore follows a Gaussian mixture density

lim = max(max(real(C), imag(C))) + 10 * N0; % lim specifies the bounds of the square integration domain
hY = compute_entropy(get_gauss_mixture(C, N0), lim);
hZ = log2(pi*exp(1)*N0); % entropy of AWGN
I = hY - hZ;