Y = normpdf(X,mu,sigma)- probability density function for a normal distribution with mean muand sigmastdev. Use this if you want to know the relative probability at a pointX
R = normrnd(mu,sigma)takes random samples from the same distribution as above. So use this function if you want to model something based on a normal distribution.
y = gauss(x,s,m)at first glance it looks exactly the same as normpdf. But there is a slight difference: its calculation
Y = EXP(-(X-M).^2./S.^2)./(sqrt(2*pi).*S)
while normpdfusing
Y = EXP(-(X-M).^2./(2*S.^2))./(sqrt(2*pi).*S)
, gauss() -inf inf 1/sqrt(2). PDF, , - .
p = normcdf(x,mu,sigma). . , -inf x.