How to use the fitting curve of a histogram?
1 回表示 (過去 30 日間)
古いコメントを表示
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
0 件のコメント
回答 (1 件)
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);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Probability Distributions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!