Skip to content

Commit 53ddbae

Browse files
committed
Updating chapters
1 parent 75cad57 commit 53ddbae

File tree

8 files changed

+25
-38
lines changed

8 files changed

+25
-38
lines changed

chapters/chap01.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
" local, _ = urlretrieve(url, filename)\n",
6060
" print('Downloaded ' + local)\n",
6161
" \n",
62-
"download('https://raw.githubusercontent.com/AllenDowney/' +\n",
63-
" 'ModSimPy/master/modsim.py')"
62+
"download('https://github.com/AllenDowney/ModSimPy/raw/master/' +\n",
63+
" 'modsim.py')"
6464
]
6565
},
6666
{
@@ -125,7 +125,7 @@
125125
"This book is about modeling and simulation of physical systems. The\n",
126126
"following diagram shows what I mean by \"modeling\":\n",
127127
"\n",
128-
"<img src =\"https://github.com/AllenDowney/ModSimPy/raw/master/book/figs/modeling_framework.png\" width=\"400\">"
128+
"![Diagram of the modeling framework](https://github.com/AllenDowney/ModSim/raw/main/figs/modeling_framework.png)"
129129
]
130130
},
131131
{
@@ -1277,7 +1277,7 @@
12771277
"name": "python",
12781278
"nbconvert_exporter": "python",
12791279
"pygments_lexer": "ipython3",
1280-
"version": "3.9.1"
1280+
"version": "3.7.9"
12811281
}
12821282
},
12831283
"nbformat": 4,

chapters/chap05.ipynb

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@
119119
{
120120
"cell_type": "markdown",
121121
"id": "continuing-cancellation",
122-
"metadata": {},
122+
"metadata": {
123+
"tags": []
124+
},
123125
"source": [
124126
"The following cell downloads a copy of https://en.wikipedia.org/wiki/World_population_estimates"
125127
]
@@ -128,7 +130,9 @@
128130
"cell_type": "code",
129131
"execution_count": 4,
130132
"id": "convenient-stroke",
131-
"metadata": {},
133+
"metadata": {
134+
"tags": []
135+
},
132136
"outputs": [],
133137
"source": [
134138
"download('https://raw.githubusercontent.com/AllenDowney/' +\n",
@@ -141,8 +145,7 @@
141145
"metadata": {},
142146
"source": [
143147
"To read this data, we will use Pandas, which provides functions for\n",
144-
"working with data. The function we'll use is `read_html`, which can read a web page and extract data from any tables it contains. Before we can use it, we have to import it. You have already seen this import\n",
145-
"statement:"
148+
"working with data. The function we'll use is `read_html`, which can read a web page and extract data from any tables it contains. Before we can use it, we have to import it."
146149
]
147150
},
148151
{
@@ -955,6 +958,7 @@
955958
}
956959
],
957960
"metadata": {
961+
"celltoolbar": "Tags",
958962
"kernelspec": {
959963
"display_name": "Python 3",
960964
"language": "python",
@@ -970,7 +974,7 @@
970974
"name": "python",
971975
"nbconvert_exporter": "python",
972976
"pygments_lexer": "ipython3",
973-
"version": "3.9.1"
977+
"version": "3.7.9"
974978
}
975979
},
976980
"nbformat": 4,

chapters/chap09.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@
994994
"source": [
995995
"**Exercise:** Use SymPy to solve the quadratic growth equation using the alternative parameterization\n",
996996
"\n",
997-
"$\\frac{df(t)}{dt} = \\alpha f(t) + \\beta f^2(t) $"
997+
"$$ \\frac{df(t)}{dt} = \\alpha f(t) + \\beta f^2(t) $$\n"
998998
]
999999
},
10001000
{
@@ -1109,7 +1109,7 @@
11091109
"name": "python",
11101110
"nbconvert_exporter": "python",
11111111
"pygments_lexer": "ipython3",
1112-
"version": "3.9.1"
1112+
"version": "3.7.9"
11131113
}
11141114
},
11151115
"nbformat": 4,

chapters/chap10.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@
447447
"name": "python",
448448
"nbconvert_exporter": "python",
449449
"pygments_lexer": "ipython3",
450-
"version": "3.9.1"
450+
"version": "3.7.9"
451451
}
452452
},
453453
"nbformat": 4,

chapters/chap11.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@
800800
"name": "python",
801801
"nbconvert_exporter": "python",
802802
"pygments_lexer": "ipython3",
803-
"version": "3.9.1"
803+
"version": "3.7.9"
804804
}
805805
},
806806
"nbformat": 4,

chapters/chap17.ipynb

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,6 @@
2222
"License: [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-nc-sa/4.0/)"
2323
]
2424
},
25-
{
26-
"cell_type": "code",
27-
"execution_count": 2,
28-
"id": "electoral-turkey",
29-
"metadata": {
30-
"tags": []
31-
},
32-
"outputs": [],
33-
"source": [
34-
"# install Pint if necessary\n",
35-
"\n",
36-
"try:\n",
37-
" import pint\n",
38-
"except ImportError:\n",
39-
" !pip install pint"
40-
]
41-
},
4225
{
4326
"cell_type": "code",
4427
"execution_count": 3,
@@ -317,7 +300,7 @@
317300
"id": "close-payday",
318301
"metadata": {},
319302
"source": [
320-
"`data` has two columns: `glucose` is the concentration of blood glucose in mg/dL; `insulin` is the concentration of insulin in the blood in μU/mL (a medical \"unit\", denoted U, is an amount defined by convention in context). The index is time in minutes.\n",
303+
"`data` has two columns: `glucose` is the concentration of blood glucose in mg/dL; `insulin` is the concentration of insulin in the blood in $\\mu$U/mL (a medical \"unit\", denoted U, is an amount defined by convention in context). The index is time in minutes.\n",
321304
"\n",
322305
"This dataset represents glucose and insulin concentrations over\n",
323306
"182 min for a subject with normal insulin production and sensitivity."
@@ -562,7 +545,7 @@
562545
"name": "python",
563546
"nbconvert_exporter": "python",
564547
"pygments_lexer": "ipython3",
565-
"version": "3.9.1"
548+
"version": "3.7.9"
566549
}
567550
},
568551
"nbformat": 4,

chapters/chap19.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@
180180
"source": [
181181
"## Low-Pass Filter\n",
182182
"\n",
183-
"The following circuit diagram (from <http://modsimpy.com/divider>) shows a low-pass filter built with one resistor and one capacitor.\n",
183+
"The following circuit diagram (from [Wikipedia](https://commons.wikimedia.org/wiki/File:1st_Order_Lowpass_Filter_RC.svg)) shows a low-pass filter built with one resistor and one capacitor.\n",
184184
"\n",
185-
"![Circuit diagram of a low-pass filter](https://github.com/AllenDowney/ModSim/raw/main/figs/RC_Divider.svg)\n",
185+
"![Circuit diagram of a low-pass filter](https://github.com/AllenDowney/ModSim/raw/main/figs/Lowpass_Filter_RC.png)\n",
186186
"\n",
187187
"A \"filter\" is a circuit takes a signal, $V_{in}$, as input and produces a signal, $V_{out}$, as output. In this context, a \"signal\" is a voltage that changes over time.\n",
188188
"\n",
@@ -206,7 +206,7 @@
206206
"\n",
207207
"$$I_R = (V_{in} - V_{out}) / R$$ \n",
208208
"\n",
209-
"where $R$ is resistance in ohms (Ω).\n",
209+
"where $R$ is resistance in ohms ($\\Omega$).\n",
210210
"\n",
211211
"Assuming that no current flows through the output of the circuit,\n",
212212
"Kirchhoff's current law implies that the current through the capacitor\n",
@@ -355,7 +355,7 @@
355355
"name": "python",
356356
"nbconvert_exporter": "python",
357357
"pygments_lexer": "ipython3",
358-
"version": "3.9.1"
358+
"version": "3.7.9"
359359
}
360360
},
361361
"nbformat": 4,

chapters/chap22.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@
10841084
"source": [
10851085
"**Exercise:** The model so far is based on the assumption that coefficient of drag does not depend on velocity, but in reality it does. The following figure, from Adair, [*The Physics of Baseball*](https://books.google.com/books/about/The_Physics_of_Baseball.html?id=4xE4Ngpk_2EC), shows coefficient of drag as a function of velocity.\n",
10861086
"\n",
1087-
"<img src=\"https://github.com/AllenDowney/ModSimPy/raw/master/figs/baseball_drag.png\" width=\"400\">\n",
1087+
"![Graph of drag coefficient versus velocity](https://github.com/AllenDowney/ModSimPy/raw/master/figs/baseball_drag.png)\n",
10881088
"\n",
10891089
"I used [an online graph digitizer](https://automeris.io/WebPlotDigitizer/) to extract the data and save it in a CSV file. "
10901090
]
@@ -1375,7 +1375,7 @@
13751375
"name": "python",
13761376
"nbconvert_exporter": "python",
13771377
"pygments_lexer": "ipython3",
1378-
"version": "3.9.1"
1378+
"version": "3.7.9"
13791379
}
13801380
},
13811381
"nbformat": 4,

0 commit comments

Comments
 (0)