Gaussian Function Formula, cftool app.
18 ビュー (過去 30 日間)
古いコメントを表示
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
0 件のコメント
回答 (1 件)
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
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
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.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!