How do I fit the Gaussian distribution?
Show older comments
The noise histogram is a Gaussian distribution as seen in the graph. I want to fit this histogram. I used 'histfit' command but it didn't give correct result. So I wrote code to manually fit it. However, as you can see, this does not give the correct result. How do I fit this histogram correctly? I would be very happy if you could help me with this subject.

noise_filt = cat(2,filt_noise{:});
mu = 0; %mean
noise_sigma = 29*10^-6; %std deviation
noise_varyans = noise_sigma^2;
x = -0.1:0.001:0.1;
pdf = (1/sqrt(2*pi*noise_sigma^2)) .* exp((-(x-mu).^2)/(2*noise_sigma^2));
histogram(noise_filt);
%histfit(noise_filt);
hold on;
plot(x,pdf,'LineWidth',2);
Accepted Answer
More Answers (0)
Categories
Find more on Exploration and Visualization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
