Hertzsprung–Russell diagram
MATH 210-01, Fall 2021
Ryan Pellico, Department of Mathematics, Trinity College
In class we used the script HR_diagram.m to import stellar data from an Excel spreadsheet using
the xlsread function, and extract the relative magnitudes (m) from the second column, observed
colors (c) from the third column, and parallax measurements (p) from the fourth column.
The Hertzsprung-Russel (HR) diagram is a scatter plot relating the absolute magnitude (M) (o
luminosity) of stars with their observed color (or effective temperature). In order to produce this
diagram, we calculated M via the relation M = m+ 5 · (log10(p XXXXXXXXXXYou can read more about the HR
diagram here:
https:
en.wikipedia.org/wiki/Hertzsprung%E2%80%93Russell_diagram
The original data is available as a text file at the following website, and has been converted into an
Excel spreadsheet available on Moodle.
http:
u
o.astr.cwru.edu/Academics/Astr221/HW/HW5/yaletrigplx.dat
1. (25 points) Write a line (or lines) that could be added to the script to modify the axis so the
horizontal axis is from −0.5 to 2.25 and the vertical axis is from −10 to 20.
Hint: help axis, help xlim, help ylim.
2. (25 points) Write a line (or lines) that could be added to the script to add reasonable labels to
the horizontal and vertical axes, and a title.
Hint: help xlabel, help ylabel, help title.
3. (25 points) Write a line (or lines) that could be added to the script to create an n × 3 matrix
named COL of colors to try and match the colors of stars indicated by the below diagram:
1
https:
en.wikipedia.org/wiki/Hertzsprung%E2%80%93Russell_diagram
http:
u
o.astr.cwru.edu/Academics/Astr221/HW/HW5/yaletrigplx.dat
4. (25 points) Write a line (or lines) that could be added to the script to deletes all rows from the
matrix NUM that have a value in the third column less than 2.25. Does this produce a different
figure than just changing the axis to exclude these points? Explain.
2
HR_star_data
2 4.61 1.04 0.0135 149
3 8.45 1.05 0.0717 113
4 9.01 1.44 0.0886 23
6 8.6 0.94 0.0147 55
7 5.96 0.67 0.0455 50
7 6.43 0.64 0.0455 50
8 5.7 0.52 0.0495 97
8 5.69 0.52 0.0495 97
9 6.13 0.75 0.0664 63
9.01 13.74 1.99 0.213 36
9.11 14.17 1.49 0.0535 25
10 8.37 0.65 0.0075 119
11 8.7 0.8 0.0392 150
11.01 13.07 1.52 0.044 63
12 2.06 -0.11 0.027 79
13 6.19 0.48 0.0462 72
16 2.27 0.34 0.0695 66
16.1 11.8 1.48 0.0575 101
17 7.01 0.92 0.0327 105
17.02 13.73 1.39 0.0193 30
18 5.42 0.42 0.0213 149
18 6.12 0.44 0.0213 149
19 3.88 1.03 0.0645 161
22.01 10.87 1.45 0.0085 190
23 7.96 0.75 0.0307 84
24 4.89 0.49 0.0658 149
25 9.91 1.06 0.0288 117
26 8.35 0.62 0.0495 150
27 5.25 0.44 0.0322 137
27.01 14.36 0.42 0.0906 37
29.01 13.27 1.52 0.0283 24
30 7.95 0.95 0.0215 150
32 13.06 1.6 0.0458 51
32.1 9 1.36 0.0219 150
34 5.72 0.31 0.0241 111
34.01 15.34 0.21 0.0329 48
36 8.37 0.63 0.0328 92
36.01 15.9 0.58 0.0513 38
37 5.12 1.62 0.0025 86
38 4.8 1.57 0.0141 98
39 4.44 1.66 0.0272 173
40 6.6 -0.02 0.0096 106
40.01 11.53 1.74 0.1821 68
42 12.54 1.66 0.0866 134
42.11 12.26 1.55 0.0661 16
45 8.94 1.42 0.0681 39
45.01 13.79 1.62 0.0569 37
46 6.85 0.64 0.0674 150
47 4.61 0.06 0.0191 98
48 7.96 0.66 0.0328 84
48.01 6.66 0.6 0.0016 133
48.02 12.49 1.57 0.0465 120
48.03 13.95 1.49 0.0284 35
48.04 10.99 1.46 0.0365 120
49 8.07 1.56 0.282 22
50 6.5 0.59 0.0288 70
51 4.52 0.05 0.0193 125
51.01 10.88 1.52 0.0359 120
52 6.46 0.68 0.0475 115
53 3.56 1.22 0.0116 23
53.01 15.37 -0.12 0.03 94
54 4.23 0.58 0.1408 105
54.01 16.05 1.98 0.0793 37
55 5.18 0.42 0.0156 72
56 5.51 -0.05 0.0101 127
57 10.4 1.48 0.0505 69
58 5.18 1 0.0259 161
60 8.94 0.68 0.0111 93
61 8.3 0.9 0.0473 113
61.01 11.24 1.5 0.0628 40
62 6.39 0.66 0.0419 35
63 8.41 1.57 0.029 128
64 9.84 0.84 0.0153 110
64.1 11.88 1.48 0.0151 173
64.11 14.27 1.59 0.061 41
65.1 5.4 0 0.0153 111
65.12 14.54 1.67 0.0528 44
66 7.92 0.95 0.0491 125
68 6.82 0.6 0.028 101
69 2.8 0.62 0.1501 72
70.01 10.56 1.47 0.059 46
71 2.39 1.09 0.0384 77
72 3.94 0.17 0.0712 137
72.02 11.66 1.22 0.0221 38
73 5.06 1.65 0.0155 111
74 5.17 0.03 0.0106 72
76 6.04 0.43 0.0329 111
77 5.43 1.56 0.0142 149
77.01 12.23 1.48 0.0754 51
78 9.63 1.14 0.0279 150
79 8.4 0.62 0.0049 133
79.01 11.03 1.14 0.0283 120
80 6.21 0.84 0.0227 174
80.01 10.17 1.09 0.0331 82
81.01 7.72 0.8 0.0067 10
83 5.19 0.12 0.0163 149
83.01 14.99 1.51 0.0203 39
85 5.6 1.15 0.0079 141
86 10.4 1.54 0.0998 25
87 4.73 -0.1 0.0283 150
87.01 12.75 1.64 0.0623 42
88 4.77 0.02 0.0252 137
89 8.52 0.83 0.0242 58
90 4.37 -0.07 0.0272 73
90.1 5.38 1.08 0.0333 98
91 6.3 1 0.0051 159
92 9.61 1.35 0.0332 70
92.1 11 1.36 0.0316 83
93 5.09 0.04 0.0478 114
93.01 13.51 1.65 0.0507 31
95 6.41 0.61 0.0389 106
95.01 14.88 0.67 0.0055 42
96 7.37 0.54 0.0438 150
96.1 5.57 0.47 0.0491 161
97 5.2 0.56 0.0615 45
97 5.65 0.57 0.0615 45
97.01 12.54 1.55 0.0621 91
97.1 8.62 0.83 0.0369 101
97.11 15.61 0.2 0.0304 40
97.12 11.71 1.54 0.0439 98
98 7.94 0.7 0.0268 74
98 8.43 0.66 0.0268 74
98.01 6.41 0.52 0.0218 111
98.02 15.32 1.89 0.0636 45
99 5.13 1.6 0.0079 65
99.1 8.37 0.78 0.0774 150
102 6.78 0.64 0.0376 150
103 6.4 0.55 0.0272 107
104 5.57 0.72 0.0748 84
104 6.23 0.72 0.0748 84
106 4.37 0.87 0.0339 75
106.01 13.24 0.54 0.0134 144
107 11.05 1.53 0.0801 39
108 3.27 1.28 0.029 18
109 7.3 0.63 0.0179 101
110 5.87 0.85 0.0962 63
112 10.57 1.16 0.0147 150
113 5.36 1.16 0.0077 98
114 2.23 1.17 0.0127 61
115 6.69 0.51 0.0193 150
116 7.36 0.94 0.0596 65
117 6.14 0.7 0.0412 97
118.01 14.02 1.55 0.0434 20
118.02 5.33 0.89 0.0101 125
119 6.97 0.65 0.038 71
120 5.89 0.55 0.0567 106
120.1 10.89 1.32 0.0301 150
120.11 14.53 0.62 0.1012 104
121 4.59 0.97 0.003 161
122 10.25 0.36 0.0081 108
123 7.6 0.52 0.0137 82
125 10.52 1.5 0.0472 150
127 4.94 0.18 0.0219 84
129 7.19 0.75 0.0231 94
130 8.73 1.13 0.0526 77
131 5.39 0.5 0.0368 173
131.01 14.53 1.58 0.0518 40
132 10.86 1.03 0.0025 249
133 9.25 0.67 0.0182 257
133.01 10.93 1.34 0.0423 120
134 2.04 1.02 0.0555 93
135.02 12.84 1 0.0194 104
137 4.36 0 0.031 101
138 4.76 1.01 0.0213 186
138.01 13.29 1 0.0095 46
139 5.9 1.16 0.0082 161
140 10.78 1.44 0.0564 163
141 7.79 0.67 0.0398 163
142 5.42 0.04 0.0113 98
143 5.24 0.33 0.0463 137
144 8.01 1 0.0432 150
145 6.54 0.65 0.0541 117
145.01 16.7 1.61 0.0147 40
146 8.48 1.17 0.0803 106
146.01 5.8 0.64 0.0481 186
147 5.5 0.98 0.024 117
147.01 12.31 1.19 0.0099 236
148 5.38 1.65 0.0146 141
149 8.64 0.64 0.0331 150
150.01 15.78 1.63 0.0284 29
151 4.06 1.12 0.0355 96
152.2 6.54 0.5 0.0215 111
152.21 12.56 1.25 0.0042 234
152.22 12.13 0.43 0.0024 239
153 7.85 0.54 0.0412 110
154 7.74 0.51 0.0384 150
155 3.44 0.57 0.1717 18
156 5.75 0.88 0.1361 20
156.02 10.7 0.58 0.0077 235
157 7.76 0.9 0.0167 105
157.01 12.14 0.7 0.0194 234
158 4.43 1.5 0.0176 94
159 5.07 0.51 0.0455 125
160 12.38 0.55 0.2325 19
162 7.16 0.78 0.0623 101
164 6.3 0.36 0.0103 93
164.01 11.74 0.87 0.0216 232
165.01 10.04 0.61 0.0166 234
165.02 14.87 1.5 0.0136 46
166 5.19 0.5 0.0634 81
167 5.07 1.37 0.0235 137
169 10.67 1.39 0.0547 34
169.01 9.6 0.89 0.0053 232
169.02 11.63 0.53 0.007 238
169.03 8.69 0.8 0.0082 99
169.04 13.08 0.88 0.0064 237
170 9.24 1.21 0.0474 68
172 5.22 0.36 0.0035 149
172.01 11.35 1.1 0.0017 235
172.02 15.41 1.68 0.0206 86
172.03 10.41 1.08 0.0292 235
173 8.96 1.28 0.0692 78
174 4.82 0.53 0.0644 150
174.11 12.43 1.15 0.0009 272
174.13 12.05 0.77 0.0252 234
175.01 12.21 0.94 0.0243 236
175.02 12.04 1.05 0.0106 235
175.03 9.16 0.58 0.053 159
175.03 9.73 0.55 0.053 159
177 7.17 0.93 0.0818 106
177.01 12.4 0.89 0.0309 234
180 8.47 1.4 0.0133 62
181 4.83 1.21 0.005 72
181.02 12.23 0.9 0.019 233
181.03 10.39 0.66 0.0425 180
182.01 12.34 0.58 0.0147 236
183 5.79 -0.02 0.0129 162
183.1 7.38 0.65 0.0382 78
183.11 12.74 1.03 0.0183 235
183.12 12.19 0.6 0.0037 234
184 9.1 1.03 0.0434 61
184.01 11.89 1.48 0.0181 234
185 2.47 -0.15 0.0148 89
186 4.63 0.96 0.0354 67
186.01 11.83 1.15 0.0064 234
187 12.36 1.51 0.0616 150
187.01 9.48 1.18 0.0279 233
188 5.31 1.52 0.0056 91
189 3.87 0.13 0.0338 79
190 5.45 1.09 0.0338 186
190.01 13.72 1.65 0.0564 41
190.02 15.02 1.71 0.0333 38
190.03 10.96 0.96 0.0195 235
191 4.42 0.94 0.0061 73
191.01 11.48 1.02 0.0059 232
192 9.46 0.86 0.0698 150
192.01 12.47 0.79 0.0099 233
193 9.47 1.32 0.0592 97
194 7.08 0.46 0.0304 78
194 7.79 0.43 0.0304 78
194.1 11.77 1.56 0.0769 142
198 8.45 0.6 0.0402 120
200 7.33 1.07 0.0508 151
200.01 8.56 0.63 0.018 238
200.02 9.87 0.5 0.0325 238
201 10.83 1.57 0.0909 44
202 10.06 1.47 0.1174 41
202.01 9.95 1.11 0.0572 235
202.02 10.11 0.76 0.0254 233
202.03 12.79 0.89 0.0079 236
203 7.67 0.75 0.0384 130
204 9.56 1.5 0.1065 58
204.1 5.59 1.18 0.0325 150
204.11 9.75 0.33 0.0206 238
205 13.66 1.68 0.0955 73
205.1 10.56 1.19 0.0438 106
205.11 11.84 1.23 0.0281 234
205.2 10.97 1.43 0.0313 110
206 8.2 1 0.0276 103
206.1 6.9 0.65 0.0114 150
207 6.45 0.25 0.01 162
208 10.06 1.37 0.0195 150
209 4.28 0.96 0.0261 65
210 5.36 0.9 0.0228 127
210.01 13.96 0.31 0.0469 38
210.02 11.23 0.86 0.0148 232
210.04 11.83 0.61 0.0294 239
211 6.25 1.12 0.0099 107
214 10.26 0.78 0.0124 110
214.01 11.25 1.49 0.0177 234
215 9.8 1.19 0.04 126
215.03 14.47 1.87 0.0998 50
215.1 6.83 1.59 0.0094 222
216 7.71 0.61 0.0427 106
216.01 14.81 1.88 0.0793 30
216.02 8.67 1.16 0.0329 52
217 8.98 1.3 0.0666 40
217.01 12.41 0.88 0.0075 235
217.02 10.95 1.13 0.0088 232
217.03 11.4 0.86 0.0197 235
217.05 11.37 1.47 0.0634 120
218 7.57 0.5 0.0302 222
219 5.17 0.69 0.1339 17
220 3.31 0.89 0.02 161
221 11.52 0.88 0.0071 40
222 13.35 1.59 0.0451 32
223 5.03 0.11 0.0299 98
224 8.41 1.12 0.052 87
225 8.85 0.94 0.0475 110
226 6.46 0.86 0.0283 127
227 5.52 0.34 0.0331 117
228 5.21 0.16 0.0133 186
229 7.68 0.72 0.0038 90
231 10.56 1.28 0.045 150
232 5.37 0.88 0.0316 161
233 3.45 1.16 0.0333 32
234 4.25 -0.07 0.0009 94
235 5.29 -0.02 0.0155 98
236 6.74 1.17 0.0026 150
238 2.06 1.58 0.0477 79
239 9.1 0.79 0.0397 150
240.01 5.65 0.6 0.0303 96
241 4.33 0.17 0.0087 64
243 5.81 -0.1 0.0021 72
244 4.66 1.03 0.0136 79
245 4.51 1.09 0.0222 94
246 9.8 1.56 0.1205 101
246.01 12.89 1.62 0.0628 18
248.01 12.05 1.86 0.2688 32
249 7.93 1.53 0.0145 141
250 4.65 1.04 0.0059 99
250.01 14.76 1.81 0.0716 27
251 5.24 0.32 0.0233 95
253 5.13 0.46 0.0574 66
254 5.7 0.42 0.0279 77
254.01 15.5 1.5 0.0282 68
255 8.47 0.56 0.042 150
257 4.96 0.58 0.0648 110
257.01 15.03 1.82 0.0481 45
259 9.05 0.76 0.0475 150
260.1 5.41 0.9 0.0163 111
261 7.2 0.93 0.0275 110
261 7.69 0.94 0.0275 110
262 6.52 0.56 0.0374 97
263 9.66 1.29 0.0409 120
264 4.86 0.47 0.0533 98
264 4.95 0.45 0.0533 98
266 5.16 0.07 0.0123 61
267 9.78 1 0.0571 67
267.01 13.83 0.14 0.0649 30
268.1 11.76 1.47 0.0458 92
269 7.98 0.81 0.0473 84
269.1 11.56 1.43 0.0456 150
270 7.11 0.82 0.0417 95
272 8.34 0.79 0.0288 150
273 4.76 0.03 0.0166 111
274 8.9 0.59 0.0255 51
275 7.64 1.03 0.028 208
275.01 11.34 1.32 0.0431 120
276 10.36 1.34 0.0348 80
277.02 10.64 1.14 0.0403 160
277.03 12.17 0.75 0.0003 120
278 8.5 0.92 0.0191 150
279 4.88 1.08 0.0148 19
281 6.96 0.62 0.037 96
282 10.15 1.4 0.0633 150
282.1 9.46 1.04 0.0249 150
282.1 9.65 0.97 0.0249 150
282.11 13.61 1.76 0.0694 40
283 7.85 0.9 0.0384 69
284.01 17.1 0.82 0.0321 55
284.03 10.1 1.02 0.0204 120
285 4.74 1.05 0.0126 101
285.01 11.34 1.32 0.0152 120
285.02 9.57 1.02 0.0312 120
286 3.6 1.06 0.0355 26
287 2.68 0.13 0.0343 55
287.01 5.91 0.41 0.0293 60
289 8.5 0.88 0.0552 145
289.1 10.3 1.06 0.0114 97
290 9.46 1.01 0.0269 106
291 8.31 0.69 0.0236 150
292.1 13.12 1.67 0.0315 178
293 4.9 1.23 0.0058 137
294 5.38 0.39 0.0368 72
296 5.5 1.11 0.014 72
297 6.41 1.24 0.022 149
298 4.83 0.42 0.027 63
298.2 7.93 0