Show older comments
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 Comments
the cyclist
on 23 Jan 2012
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
on 23 Jan 2012
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
on 23 Jan 2012
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
on 23 Jan 2012
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
on 25 Jan 2012
the cyclist
on 25 Jan 2012
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
on 25 Jan 2012
Answers (0)
Categories
Find more on Histograms 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!