Histogram
显示 更早的评论
hi I have a histogram. and I want ti fit an diagram on it. I used histfit () but I couldn't get a reasonable results. have anyone has a solution ?
7 个评论
the cyclist
2012-1-23
You will be more likely to get a helpful answer if you provide more detail on what you are trying to do. For example, I am not sure what you mean by "I have a histogram". Do you just have a graph? Do you have frequency counts for particular bins? Do you have access to all the underlying data that went into making the histogram?
Walter Roberson
2012-1-23
Sounds sort of similar to that situation about a week ago where someone had histogram data and wanted to fit a normal distribution to the bin counts.
If fitting the bin counts is what is desired, then the situation should not be any different than if the bin counts were the original data and one was curve-fitting to it.
the cyclist
2012-1-23
Agreed. When it comes down to the actual implementation, though, some functions [I am thinking of ksdensity() in particular] are more straightforwardly applied if she has the underlying data, so it might affect the advice I would offer.
Image Analyst
2012-1-23
And define what "a diagram" is. What is that? Do you want some sort of curve displayed over your histogram bar chart, like a line plot of a Gaussian or something? By the way, wouldn't a Gaussian fit to a histogram just be finding the mean and standard deviation of the histogram? Don't those define a Gaussian? If not, what other way would you do it?
Mona Bahri
2012-1-25
the cyclist
2012-1-25
Mona, can you give more detail about what you have, and what you are trying to accomplish? You keep giving us tiny bits of information, which makes us guess.
histfit() does sound like a function that would have done what you want. Maybe you could discuss why you found the results unreasonable. Maybe you could upload a figure that shows the results. Can you post the code you used, and the sample of data?
Mona Bahri
2012-1-25
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Histograms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!