Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the differences between different gaussian functions in Matlab?

  1. y = gauss(x,s,m)
  2. Y = normpdf(X,mu,sigma)
  3. R = normrnd(mu,sigma)

What are the basic differences between these three functions?

like image 917
user366312 Avatar asked Jun 18 '17 05:06

user366312


People also ask

What is Gaussian function Matlab?

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.

What is the difference between normal and Gaussian 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.

What is the Gaussian function used for?

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 ...

Which one of the following is an example of Gaussian membership function?

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.


1 Answers

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.

like image 60
Leander Moesinger Avatar answered Nov 15 '22 08:11

Leander Moesinger