function [res]=normalpdf(x,m,c) 
%x is the vector %m is the mean vector %c is the co-variance matrix 
N=length(x); 
temp1=exp(-(1/2)*((x-m)'*inv(abs(c))*(x-m)));
temp2=1/((2*pi)^(N/2));
temp3=1/(det(c)^(1/2)); 
res=temp1*temp2*temp3;