A place to post useful MATLAB things.
Like MATLAB's mvnpdf
but takes in complex values. See wikipedia.
Note that definitions are slightly different. Below, Cz = E{ZZ'}
, Pz = E{ZZ.'}
, and \Gamma = conj(Cz) - Pz'*inv(Cz)*Pz
where X'
means Hermitian and X.'
means transpose in MATLAB.
cmvnpdf = @(Z,Mz,Cz,Pz)(1/(pi^length(Z)*sqrt(det(Cz)*det(conj(Cz) - Pz'*inv(Cz)*Pz))))*exp(-0.5*[(Z-Mz)' (Z-Mz).']*inv([Cz Pz; Pz' conj(Cz)])*[(Z-Mz); conj(Z-Mz)])