diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 00a1c394..d7484846 100755 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -25,7 +25,7 @@ "state": { "type": "image", "state": { - "file": "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/ex2.png" + "file": "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/ex3.png" } } } @@ -97,7 +97,7 @@ "state": { "type": "backlink", "state": { - "file": "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/ex2.png", + "file": "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/ex3.png", "collapseAll": true, "extraContext": false, "sortOrder": "alphabetical", @@ -114,7 +114,7 @@ "state": { "type": "outgoing-link", "state": { - "file": "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/ex2.png", + "file": "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/ex3.png", "linksCollapsed": false, "unlinkedCollapsed": true } @@ -137,7 +137,7 @@ "state": { "type": "outline", "state": { - "file": "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/ex2.png" + "file": "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/ex3.png" } } } @@ -177,9 +177,10 @@ }, "active": "e7019452a0bd61a5", "lastOpenFiles": [ - "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09 Example.py~", - "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/ex1.png", "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/ex2.png", + "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09 Example.py~", + "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/ex3.png", + "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/ex1.png", "3-99 Research/6. Researching Techniques/Setting up a virtual python environment (venv).md", "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09", "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/venv/lib/python3.12/site-packages/__pycache__/pylab.cpython-312.pyc", @@ -197,7 +198,6 @@ "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/venv/lib/python3.12/site-packages/matplotlib/mpl-data/images/zoom_to_rect.svg", "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/venv/lib/python3.12/site-packages/matplotlib/mpl-data/images/zoom_to_rect.png", "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/venv/lib/python3.12/site-packages/matplotlib/mpl-data/images/zoom_to_rect-symbolic.svg", - "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/venv/lib/python3.12/site-packages/matplotlib/mpl-data/images/subplots.svg", "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/venv/lib/python3.12/site-packages/scipy/fft/_pocketfft/LICENSE.md", "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/venv/lib/python3.12/site-packages/numpy/random/LICENSE.md", "300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09 Frameworks and Review.md", diff --git a/300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09 Example.py b/300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09 Example.py index 065a5438..f9f505ff 100644 --- a/300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09 Example.py +++ b/300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09 Example.py @@ -35,8 +35,28 @@ f.set_figheight(12) ts = np.linspace(0,3,1000) ic = 1 xs = odeint(dx_dt, ic, ts) -print(xs) +#print(xs) plt.plot(ts,xs) plt.savefig("2024-09-09/ex2.png") -plt.show() +#plt.show() + +#Let's do the same thing in the time domain! +ics = np.linspace(-4,2.0001,20) +ts = np.linspace(0,0.5,1000) + +# loop over the initial conditions +for r in ics: + x0 = [r] + xs = odeint(dx_dt,x0,ts) + plt.plot(ts,xs[:,0],"b") + +x1 = ts - ts - 2 +x2 = ts - ts + 2 +f2 = plt.figure() +plt.plot(ts,x1,'r',ts,x2,'r--') +plt.grid(True) +plt.xlabel('Time, some units.') +plt.ylabel('Voltage shrug?') +plt.savefig('2024-09-09/ex3') + diff --git a/300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/ex3.png b/300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/ex3.png new file mode 100644 index 00000000..225a2b6e Binary files /dev/null and b/300s School/301. ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/ex3.png differ