Creating Bins in a Histogram
Show older comments
I have a data set with the first column being the years and the second column being the distances. I need to create a histogram that bins how many of these distances occur during the same year, and then occurring every 10 years. (For example, 1880-1890 0, 1890-1900 1, 1900-1910 1).
I have attached the text file.
Accepted Answer
More Answers (1)
Image Analyst
on 12 Oct 2015
0 votes
The data you posted really doesn't have enough observations per decade to make a good histogram. There are just a handful per decade and usually only one or 2 per year. Nonetheless, you can use hist3() in the Stats toolbox to give counts per decade, and then per year in each decade.
1 Comment
jgillis16
on 12 Oct 2015
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!