MATLAB: Fitting gussian curve in the plot

guassianhistogramMATLABmean

Hi Volks,
By using hist command in Matlab, I am getting following plot.
figure,plot(f2,real(resd));
figure,hist(abs(resd(1:1496,500)));
How to fit Gaussian Curve and find out mean & variance.

Best Answer

You can use histfit to fit the distribution, but it will not give you the parameters.
Use the normfit function to get the parameters.