필터 지우기
필터 지우기

How to use the fitting curve of a histogram?

조회 수: 1 (최근 30일)
Wenlong
Wenlong 2012년 10월 26일
Hi, all
I am using histfit to find a fitting curve to my histogram. According to the observation, it should be gaussian.
As I look into the help of matlab, it says that histfit returns a vector which contains handles to the histogram and the density curve. My question is, how to use the handle to get access to the density curve? And how can I get access to the variance of the fitting curve?
Thank you very much for any help.
Best regards Wenlong

답변 (1개)

Wayne King
Wayne King 2012년 10월 26일
If you think that a Gaussian distribution provides a good fit, you can use normfit() with your data to get the estimates of mu and sigma. For example:
X = randn(100,1)+2;
[muhat,sigmahat] = normfit(X);

카테고리

Help CenterFile Exchange에서 Probability Distributions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by