how would I create this binning algorithm?

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

Respuestas (1)

Walter Roberson
Walter Roberson el 22 de Oct. de 2017

0 votos

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.

Categorías

Más información sobre Earth and Planetary Science en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 22 de Oct. de 2017

Respondida:

el 22 de Oct. de 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by