Rank: 49773 based on 0 downloads (last 30 days) and 0 file submitted
photo

Georges

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Georges View all
Updated File Comments Rating
18 Jul 2013 Gaussian fit Fits Gaussian curve into points. The curve is understood as a probability density function, pdf. Author: Przemyslaw Baranski

18 Jul 2013 gaussian curve fit gaussian curve fit Author: Yohanan Sivan

This file poorly fits a gaussian (and has a much higher average rating) as compared to others here...
The test main file is wrong: the "rand" noise on the gaussian biases the measurements by 0.5, randn should be used instead.

Same main file used for comparison with another gaussian fit (gaussfit.m):

%% data
x=1:100;
sigma=15; mu=40; A=3;
plot(normpdf(x,mu,sigma))
y=A*exp(-(x-mu).^2/(2*sigma^2))+randn(size(x))*0.5;
hold all;
plot(x,y/(sum(y)),'.');

%% fitting
[sigmaNew,muNew,Anew]=mygaussfit(x,y);
y2=Anew*exp(-(x-muNew).^2/(2*sigmaNew^2));
plot(x,y2/(sum(y2)));

%% bis
[sigmaNew2,muNew2]=gaussfit(x,y/sum(y));
plot(normpdf(x,muNew2,sigmaNew2));
legend('truth','measurements','mygaussfit','gaussianfit')

Contact us