y = gauss(x,s,m)
Y = normpdf(X,mu,sigma)
R = normrnd(mu,sigma)
What are the basic differences between these three functions?
Description. This function computes fuzzy membership values using a Gaussian membership function. You can also compute this membership function using a fismf object. For more information, see fismf Object. A Gaussian membership function is not the same as a Gaussian probability distribution.
Gaussian distribution (also known as normal distribution) is a bell-shaped curve, and it is assumed that during any measurement values will follow a normal distribution with an equal number of measurements above and below the mean value.
Gaussian functions are widely used in statistics to describe the normal distributions, in signal processing to define Gaussian filters, in image processing where two-dimensional Gaussians are used for Gaussian blurs, and in mathematics to solve heat equations and diffusion equations and to define the Weierstrass ...
Gaussian membership function: The Gaussian membership function is usually represented as Gaussian(x:c,s) where c, s represents the mean and standard deviation. Here c represents centre, s represents width and m represents fuzzification factor.
Y = normpdf(X,mu,sigma)
is the probability density function for a normal distribution with mean mu
and stdev sigma
. Use this if you want to know the relative likelihood at a point X
.
R = normrnd(mu,sigma)
takes random samples from the same distribution as above. So use this function if you want to simulate something based on the normal distribution.
y = gauss(x,s,m)
at first glance looks like the exact same function as normpdf()
. But there is a slight difference: Its calculation is
Y = EXP(-(X-M).^2./S.^2)./(sqrt(2*pi).*S)
while normpdf()
uses
Y = EXP(-(X-M).^2./(2*S.^2))./(sqrt(2*pi).*S)
This means that the integral of gauss()
from -inf to inf is 1/sqrt(2)
. Therefore it isn't a legit PDF and I have no clue where one could use something like this.
For completeness we also have to mention p = normcdf(x,mu,sigma)
. This is the normal cumulative distribution function. It gives the probability that a value is between -inf and x
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With