how would I create this binning algorithm?
Show older comments
how would I go about this?
write a binning algorithm. You are going to categorize the exoplanets into five bins: ‘smaller than Earth’, ‘Super Earth Size (1-2 times Earth Size)’, ‘smaller than Neptune’, ‘smaller than Jupiter’, ‘bigger than Jupiter’. The units of the spreadsheet data are Rjupiter(i.e. if the radius is 2, the planet’s radius is 2 times the radius of Jupiter). Each planet should be binned only once. Make a bar graph of the five bins and label properly
Answers (1)
Walter Roberson
on 22 Oct 2017
0 votes
Use 0 as the initial edge, so that you can get "0 up to Earth's radius" as the first bin. Use inf as the last edge so you can get "bigger than Jupiter".
I leave it to you to decide how you want to handle negative radius, which show up in some theories of intense gravitation, and in some explanations of the effects of negative energy.
Categories
Find more on Earth and Planetary Science 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!