Gaussian Function Formula, cftool app.

조회 수: 21 (최근 30일)
Muhammad Mohsin Khan
Muhammad Mohsin Khan 2020년 9월 11일
댓글: John D'Errico 2020년 9월 11일
When the standerd formula for gaussian function is
f(x) = (1/sigma.sq_root(2pi)) x e ^ (-1/2)((x-miu)/sigma)^2
then why Matlab's cftool app has used the formula
f(x) = a1*exp(-((x-b1)/c1)^2)
???
What are a1, b1, and c1 coefficients and how they have been calculated ?
Thanks

답변 (1개)

Adam Danz
Adam Danz 2020년 9월 11일
편집: Adam Danz 2020년 9월 11일
a1 is an amplitude parameter defining the height of the guassian.
b1 is the "mu" parameter defining the center.
c1 is the "sigma" parameter defining its width.
This is a typical form of the gaussian function though it can take other forms and other parameters. The first function you shared is in the form of a probability density function (which is in the guassian family). Wiki does a good job of describing the difference.
Plot them to show their differences.
f1 = @(x, mu, sigma) (1./sigma.*sqrt(2*pi)).* exp((-1/2)*((x-mu)./sigma).^2);
f2 = @(x,a1,b1,c1) a1.*exp(-((x-b1)./c1).^2);
x = linspace(0,1,100);
mu = .4;
sigma = .2;
amp = 1./sigma.*sqrt(2*pi); % same amp as f1
y1 = f1(x,mu,sigma);
y2 = f2(x,amp,mu,sigma);
cla()
hold on
plot(x,y1, 'b-', 'linewidth', 2,'DisplayName', 'f1');
plot(x,y2, 'r-', 'linewidth',2,'DisplayName', 'f2');
legend
Some forms include a vertical offset parameter (example).
Higher order guassians (aka super-gaussian) functions have a parameter that flattens the top which gradually leaves the guassian family (example).
  댓글 수: 1
John D'Errico
John D'Errico 2020년 9월 11일
To expand on what Adam has said, people have totally different desires about the parameters for such a model. While one person may wish to think of it as a Normal distribution, so scaled to have unit area, others like the idea that the height of the function when a1 is 1, is just 1.
That is, with the function defined as:
f = @(x,a1,b1,c1) a1*exp(-((x-b1)/c1)^2);
we would see
f(0,1,0,1)
ans =
1
Regardless, all of these parameters are just simple shift and scale parameters, all of which are estimated in the end. The difference is it may be easier to determine a good starting estimate for a1 by plotting the data when you use the form in f.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Fit Postprocessing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by