function pdf=multi_norm_pdf(x, mu, cov_matrix)
% 'multi_norm_pdf' is use to calculate the pdf of Multi-Normal distribution
% where x~M-Normal(mu, cov_matrix), x, mu (mean) are both column vector

[row, col]=size(x);
if row<col
    x=x';    % transfer x to a column vector 
end

[row, col]=size(mu);
if row<col
    mu=mu';  % transfer mu to a column vector 
end

k=size(cov_matrix,1);

log_likelihood=-0.5*(k*log(2*pi)+log(det(cov_matrix))+x'*inv(cov_matrix)*x);
pdf=exp(log_likelihood);
