Part 1 - Binning by Size: Make a bar graph of the five bins and label properly. You are going to categorize the exoplanets into five bins: 'smaller...
View the step-by-step solution to:

Question

Please use Matlab

script for code:

style="color:rgb(51,51,51);">https://docs.google.com/document/d/1-wEARBNo0InwgCktOwIXAYJAsY0FkhV39XDD8CZKje8/edit?usp=sharing

Screen Shot 2019-09-23 at 9.38.42 PM.png

Screen Shot 2019-09-23 at 9.38.42 PM.png

Part 1 - Binning by Size: Make a bar graph of the five bins and label properly.
You are going to categorize the exoplanets into five bins: 'smaller than Mars', 'smaller than
Earth', 'Super Earth Size (1-2 times Earth Size)', 'smaller than Saturn', 'greater than Saturn'. You
may not use an if statments or loops, use only array operations. After determining how many
planets satisfy each of the five conditions, you will store those quanties in each of the five
elements of the arrays with variable name 'bin'. Your bar graph should look like this (this was
done with inclusive condition at the max end of the range, and exclusive conditions at the min
end of each range, i.e. "smaller than or equal to mars', ' larger than mars and smaller than or
equal to earth', etc.):
1200
Exoplanets Binned by Size
1090
400
200
Part 2 - Finding Habitable Exoplanets
You are going to find the all the "potentially habitable exoplanets'. An exoplanet is habitable
when all of these conditions are true:
Planet radius is greater than 0.4 and less than 2.5
Planet's orbit is between 91 and 801 days (exclusive, like above)
Planet's equilibrium temperature is between 187 and 294 Kelvin (exclusive)
Distance from planet to its sun is between 0.75 and 1.84 AU (exclusive; 1 solar radius
= 1/215 AU)
You should locate and save the positions that satisfy the above criteria (save to variable name
'ind habit"). Then, save the names of the exoplanets associated with those index locations to the
variable 'habit_pl'. Use this variable exactly (and the rest of the variables exactly), as it will be
checked it in the tests below. Print the results to the screen (it is easiest to do this with two
separate disp calls):
These exoplanets are within the habitable zone:
"Kepler-22"
"Kepler-452"
"Kepler-62"
Part 3 - Remove NaNs and Sort by size
You are gong to sort the planets by size in order of smallest to largest.
a. Remove NaNs - you will notice that some values in the rad array are filled with NaN instead
of a value. This is becuase some explanets do not have data for their radius. The first step of
this part is to remove all the data (rad and names_pl) that do not have available radius data.
(HINT: There is a built in function called isnan that you will need to use for this part). Save
indices of where the NaNs are located to the variable name 'ind nan'
b. Sort the planets by size - The final step of this part is to sort the planets by their size from
smallest to largest. You must sort only the data without the NaNs in, so make sure remove them
first (part a). Then you will use the built in function (sort) to sort from smallest to largest (save
the sorted radii to array with variable name 'rad s'). You will need to look at the help to
understand fully how to use the built-in funciton. Save the indices of the sort to the array with
variable name 'ind_s' Save the names in sorted order to the variable 'names_pl_s'. Once you
have sorted, print out the top five smallest planets like this (it is easiest to do this with two
separate disp calls):
Top five smallest exoplanets:
"Kepler-37"
"Kepler-444"
"Kepler-102"
"Kepler-444"
"Kepler-1308"

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes