diff --git a/HW5/README.html b/HW5/README.html
new file mode 100644
index 0000000..96595a9
--- /dev/null
+++ b/HW5/README.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+Homework #5
+due 3/28/17 by 11:59pm
+Include all work as either an m-file script, m-file function, or example code included with ``` and document your code in the README.md file
+
+Create a new github repository called ‘linear_algebra’.
+
+Add rcc02007 and pez16103 as collaborators.
+Clone the repository to your computer.
+
+Create an LU-decomposition function called lu_tridiag.m
that takes 3 vectors as inputs and calculates the LU-decomposition of a tridiagonal matrix. The output should be 3 vectors, the diagonal of the Upper matrix, and the two off-diagonal vectors of the Lower and Upper matrices.
+[ud,uo,lo]=lu_tridiag(e,f,g);
+Use the output from lu_tridiag.m
to create a forward substitution and back-substitution function called solve_tridiag.m
that provides the solution of Ax=b given the vectors from the output of [ud,uo,lo]=lu_tridiag(e,f,g). Note: do not use the backslash solver \
, create an algebraic solution
+x=solve_tridiag(ud,uo,lo,b);
+Test your function on the matrices A3, A4, …, A10 generated with test_arrays.m
Solving for b=ones(N,1);
where N is the size of A. In your README.md
file, compare the norm of the error between your result and the result of AN.
+
+| size of A | norm(error) |
+|-----------|-------------|
+| 3 | ... |
+| 4 | ... |
+
+
+In the system shown above, determine the three differential equations for the position of masses 1, 2, and 3. Solve for the vibrational modes of the spring-mass system if k1=10 N/m, k2=k3=20 N/m, and k4=10 N/m. The masses are m1=1 kg, m2=2 kg and m3=4 kg. Determine the eigenvalues and natural frequencies.
+The curvature of a slender column subject to an axial load P (Fig. P13.10) can be modeled by
+
+\(\frac{d^{2}y}{dx^{2}} + p^{2} y = 0\)
+where \(p^{2} = \frac{P}{EI}\)
+where E = the modulus of elasticity, and I = the moment of inertia of the cross section about its neutral axis.
+This model can be converted into an eigenvalue problem by substituting a centered finite-difference approximation for the second derivative to give \(\frac{y_{i+1} − 2y_{i} + y_{i−1} }{\Delta x^{2}}+ p^{2} y_{i}\)
+where i = a node located at a position along the rod’s interior, and \(\Delta x\) = the spacing between nodes. This equation can be expressed as \(y_{i−1} − (2 − \Delta x^{2} p^{2} )y_{i} + y_{i+1} = 0\) Writing this equation for a series of interior nodes along the axis of the column yields a homogeneous system of equations. (See 13.10 for 4 interior-node example)
+Determine the eigenvalues for a 5-segment (4-interior nodes), 6-segment (5-interior nodes), and 10-segment (9-interior nodes). Using the modulus and moment of inertia of a pole for pole-vaulting ( http://people.bath.ac.uk/taf21/sports_whole.htm ) E=76E9 Pa, I=4E-8 m^4, and L= 5m.
+Include a table in the README.md
that shows the following results: What are the largest and smallest eigenvalues for the beam? How many eigenvalues are there?
+| # of segments | largest | smallest | # of eigenvalues |
+| --- | --- | --- | --- |
+| 5 | ... | ... | ... |
+| 6 | ... | ... | ... |
+| 10 | ... | ... | ... |
+If the segment length approaches 0, how many eigenvalues would there be?
+
+
diff --git a/HW5/README.md b/HW5/README.md
new file mode 100644
index 0000000..a8495ea
--- /dev/null
+++ b/HW5/README.md
@@ -0,0 +1,83 @@
+# Homework #5
+## due 3/28/17 by 11:59pm
+
+*Include all work as either an m-file script, m-file function, or example code included
+with \`\`\` and document your code in the README.md file*
+
+1. Create a new github repository called 'linear_algebra'.
+
+ a. Add rcc02007 and pez16103 as collaborators.
+
+ b. Clone the repository to your computer.
+
+2. Create an LU-decomposition function called `lu_tridiag.m` that takes 3 vectors as inputs
+and calculates the LU-decomposition of a tridiagonal matrix. The output should be 3
+vectors, the diagonal of the Upper matrix, and the two off-diagonal vectors of the Lower
+and Upper matrices.
+
+ ```[ud,uo,lo]=lu_tridiag(e,f,g);```
+
+3. Use the output from `lu_tridiag.m` to create a forward substitution and
+back-substitution function called `solve_tridiag.m` that provides the solution of
+Ax=b given the vectors from the output of [ud,uo,lo]=lu_tridiag(e,f,g). *Note: do not use
+the backslash solver `\`, create an algebraic solution*
+
+ ```x=solve_tridiag(ud,uo,lo,b);```
+
+4. Test your function on the matrices A3, A4, ..., A10 generated with `test_arrays.m`
+Solving for `b=ones(N,1);` where N is the size of A. In your `README.md` file, compare
+the norm of the error between your result and the result of AN\b.
+
+```
+| size of A | norm(error) |
+|-----------|-------------|
+| 3 | ... |
+| 4 | ... |
+```
+
+![Spring-mass system for analysis](spring_mass.png)
+
+5. In the system shown above, determine the three differential equations for the position
+of masses 1, 2, and 3. Solve for the vibrational modes of the spring-mass system if k1=10
+N/m, k2=k3=20 N/m, and k4=10 N/m. The masses are m1=1 kg, m2=2 kg and m3=4 kg. Determine
+the eigenvalues and natural frequencies.
+
+6. The curvature of a slender column subject to an axial load P (Fig. P13.10) can be
+modeled by
+
+$\frac{d^{2}y}{dx^{2}} + p^{2} y = 0$
+
+where $p^{2} = \frac{P}{EI}$
+
+where E = the modulus of elasticity, and I = the moment of inertia of the cross section
+about its neutral axis.
+
+This model can be converted into an eigenvalue problem by
+substituting a centered finite-difference approximation for the second derivative to give
+$\frac{y_{i+1} -2y_{i} + y_{i-1} }{\Delta x^{2}}+ p^{2} y_{i}$
+
+where i = a node located at a position along the rod’s interior, and $\Delta x$ = the
+spacing between nodes. This equation can be expressed as $y_{i-1} - (2 - \Delta x^{2}
+p^{2} )y_{i} y_{i+1} = 0$ Writing this equation for a series of interior nodes along the
+axis of the column yields a homogeneous system of equations. (See 13.10 for 4
+interior-node example)
+
+Determine the eigenvalues for a 5-segment (4-interior nodes), 6-segment (5-interior
+nodes), and 10-segment (9-interior nodes). Using the modulus and moment of inertia of a
+pole for pole-vaulting (
+[http://people.bath.ac.uk/taf21/sports_whole.htm](http://people.bath.ac.uk/taf21/sports_whole.htm))
+E=76E9 Pa, I=4E-8 m^4, and L= 5m.
+
+Include a table in the `README.md` that shows the following results:
+What are the largest and smallest eigenvalues for the beam? How many eigenvalues are
+there?
+
+```
+| # of segments | largest | smallest | # of eigenvalues |
+| --- | --- | --- | --- |
+| 5 | ... | ... | ... |
+| 6 | ... | ... | ... |
+| 10 | ... | ... | ... |
+```
+
+If the segment length ($\Delta x$) approaches 0, how many eigenvalues would there be?
diff --git a/HW5/README.pdf b/HW5/README.pdf
new file mode 100644
index 0000000..fdb31a3
Binary files /dev/null and b/HW5/README.pdf differ
diff --git a/HW5/lu_tridiag.m b/HW5/lu_tridiag.m
new file mode 100644
index 0000000..1339973
--- /dev/null
+++ b/HW5/lu_tridiag.m
@@ -0,0 +1,12 @@
+function [ud,uo,lo]=lu_tridiag(e,f,g);```
+ % lu_tridiag calculates the components for LU-decomposition of a tridiagonal matrix
+ % given its off-diagonal vectors, e and g
+ % and diagonal vector f
+ % the output is
+ % the diagonal of the Upper matrix, ud
+ % the off-diagonal of the Upper matrix, uo
+ % and the off-diagonal of the Lower matrix, lo
+ % note: the diagonal of the Lower matrix is all ones
+
+end
+
diff --git a/HW5/solve_tridiag.m b/HW5/solve_tridiag.m
new file mode 100644
index 0000000..0c9e510
--- /dev/null
+++ b/HW5/solve_tridiag.m
@@ -0,0 +1,11 @@
+function x=solve_tridiag(ud,uo,lo,b);```
+ % solve_tridiag solves Ax=b for x
+ % given
+ % the diagonal of the Upper matrix, ud
+ % the off-diagonal of the Upper matrix, uo
+ % the off-diagonal of the Lower matrix, lo
+ % the vector b
+ % note: the diagonal of the Lower matrix is all ones
+
+end
+
diff --git a/HW5/spring_mass.png b/HW5/spring_mass.png
new file mode 100644
index 0000000..274c049
Binary files /dev/null and b/HW5/spring_mass.png differ
diff --git a/HW5/spring_mass.svg b/HW5/spring_mass.svg
new file mode 100644
index 0000000..b854162
--- /dev/null
+++ b/HW5/spring_mass.svg
@@ -0,0 +1,299 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+ x1
+ x2
+ x3
+
+
+
+
+ m1
+ m2
+ m3
+ k1
+ k2
+ k3
+ k4
+
+
diff --git a/HW5/test_arrays.m b/HW5/test_arrays.m
new file mode 100644
index 0000000..002d79c
--- /dev/null
+++ b/HW5/test_arrays.m
@@ -0,0 +1,8 @@
+rand("seed",1);
+
+for i = 3:10
+ e=sort(randi(6,[i-1,1]));
+ f=sort(randi(10,[i,1]));
+ g=sort(randi(9,[i-1,1]));
+ eval(['A',int2str(i),'=diag(f)+diag(e,-1)+diag(g,1);']);
+end
diff --git a/lecture_10/octave-workspace b/lecture_10/octave-workspace
index 8a9aba2..8c437bb 100644
Binary files a/lecture_10/octave-workspace and b/lecture_10/octave-workspace differ
diff --git a/lecture_12/octave-workspace b/lecture_12/octave-workspace
index 41ef164..8c437bb 100644
Binary files a/lecture_12/octave-workspace and b/lecture_12/octave-workspace differ
diff --git a/lecture_15/eigenvalues.gif b/lecture_15/eigenvalues.gif
new file mode 100644
index 0000000..1286762
Binary files /dev/null and b/lecture_15/eigenvalues.gif differ
diff --git a/lecture_15/lecture_15.ipynb b/lecture_15/lecture_15.ipynb
index 2541de3..49e4b52 100644
--- a/lecture_15/lecture_15.ipynb
+++ b/lecture_15/lecture_15.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
- "execution_count": 40,
+ "execution_count": 1,
"metadata": {
"collapsed": true
},
@@ -13,7 +13,7 @@
},
{
"cell_type": "code",
- "execution_count": 41,
+ "execution_count": 2,
"metadata": {
"collapsed": true
},
@@ -22,6 +22,15 @@
"setdefaults"
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## UConn Hackathon Mar 24-25\n",
+ "\n",
+ "[https://www.hackuconn.org/](https://www.hackuconn.org/)"
+ ]
+ },
{
"cell_type": "markdown",
"metadata": {},
@@ -115,7 +124,7 @@
},
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": 3,
"metadata": {
"collapsed": false
},
@@ -182,8 +191,8 @@
"or\n",
"\n",
"$|K-\\lambda I| = \\left|\\begin{array}{cc}\n",
- "\\left(\\frac{2k}{m_{1}}-\\omega^{2}\\right) & -\\frac{k}{m_{1}}X_{2} \\\\\n",
- "-\\frac{k}{m_{2}}X_{1} & \\left(\\frac{2k}{m_{2}}-\\omega^{2}\\right)\n",
+ "\\left(\\frac{2k}{m_{1}}-\\omega^{2}\\right) & -\\frac{k}{m_{1}} \\\\\n",
+ "-\\frac{k}{m_{2}} & \\left(\\frac{2k}{m_{2}}-\\omega^{2}\\right)\n",
"\\end{array}\\right|=0$\n",
"\n",
"where $\\lambda = \\omega^{2}$\n"
@@ -191,7 +200,7 @@
},
{
"cell_type": "code",
- "execution_count": 34,
+ "execution_count": 4,
"metadata": {
"collapsed": false
},
@@ -200,38 +209,40 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "K =\n",
+ "'eig' is a built-in function from the file libinterp/corefcn/eig.cc\n",
"\n",
- " 10 -5\n",
- " -5 10\n",
+ " -- Built-in Function: LAMBDA = eig (A)\n",
+ " -- Built-in Function: LAMBDA = eig (A, B)\n",
+ " -- Built-in Function: [V, LAMBDA] = eig (A)\n",
+ " -- Built-in Function: [V, LAMBDA] = eig (A, B)\n",
+ " Compute the eigenvalues (and optionally the eigenvectors) of a\n",
+ " matrix or a pair of matrices\n",
"\n",
- "v =\n",
+ " The algorithm used depends on whether there are one or two input\n",
+ " matrices, if they are real or complex, and if they are symmetric\n",
+ " (Hermitian if complex) or non-symmetric.\n",
"\n",
- " -0.70711 -0.70711\n",
- " -0.70711 0.70711\n",
+ " The eigenvalues returned by 'eig' are not ordered.\n",
"\n",
- "e =\n",
+ " See also: eigs, svd.\n",
"\n",
- "Diagonal Matrix\n",
+ "Additional help for built-in functions and operators is\n",
+ "available in the online version of the manual. Use the command\n",
+ "'doc ' to search the manual index.\n",
"\n",
- " 5 0\n",
- " 0 15\n",
- "\n"
+ "Help and information about Octave is also available on the WWW\n",
+ "at http://www.octave.org and via the help@octave.org\n",
+ "mailing list.\n"
]
}
],
"source": [
- "m=40; % mass in kg\n",
- "k=200; % spring constant in N/m\n",
- "\n",
- "K=[2*k/m,-k/m;-k/m,2*k/m]\n",
- "\n",
- "[v,e]=eig(K)"
+ "help eig"
]
},
{
"cell_type": "code",
- "execution_count": 35,
+ "execution_count": 5,
"metadata": {
"collapsed": false
},
@@ -240,59 +251,38 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "ans =\n",
- "\n",
- " -10.607\n",
- " 10.607\n",
+ "K =\n",
"\n",
- "ans =\n",
+ " 10 -5\n",
+ " -5 10\n",
"\n",
- " -10.607\n",
- " 10.607\n",
- "\n"
- ]
- }
- ],
- "source": [
- "K*v(:,2)\n",
- "e(2,2)*v(:,2)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 26,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
"v =\n",
"\n",
- " 0.78868 -0.57735 0.21132\n",
- " -0.57735 -0.57735 0.57735\n",
- " 0.21132 0.57735 0.78868\n",
+ " -0.70711 -0.70711\n",
+ " -0.70711 0.70711\n",
"\n",
"e =\n",
"\n",
"Diagonal Matrix\n",
"\n",
- " 1.2679 0 0\n",
- " 0 3.0000 0\n",
- " 0 0 4.7321\n",
+ " 5 0\n",
+ " 0 15\n",
"\n"
]
}
],
"source": [
- "[v,e]=eig(A)"
+ "m=40; % mass in kg\n",
+ "k=200; % spring constant in N/m\n",
+ "\n",
+ "K=[2*k/m,-k/m;-k/m,2*k/m]\n",
+ "\n",
+ "[v,e]=eig(K)"
]
},
{
"cell_type": "code",
- "execution_count": 32,
+ "execution_count": 6,
"metadata": {
"collapsed": false
},
@@ -303,22 +293,20 @@
"text": [
"ans =\n",
"\n",
- " 1.00000\n",
- " -0.73205\n",
- " 0.26795\n",
+ " -10.607\n",
+ " 10.607\n",
"\n",
"ans =\n",
"\n",
- " 1.00000\n",
- " -0.73205\n",
- " 0.26795\n",
+ " -10.607\n",
+ " 10.607\n",
"\n"
]
}
],
"source": [
- "A*v(:,1)\n",
- "e(1,1)*v(:,1)"
+ "K*v(:,2)\n",
+ "e(2,2)*v(:,2)"
]
},
{
@@ -364,7 +352,7 @@
},
{
"cell_type": "code",
- "execution_count": 55,
+ "execution_count": 8,
"metadata": {
"collapsed": false
},
@@ -411,7 +399,7 @@
},
{
"cell_type": "code",
- "execution_count": 57,
+ "execution_count": 9,
"metadata": {
"collapsed": false
},
@@ -563,6 +551,39 @@
"![solution to principle stresses](stress_soln.svg)"
]
},
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "e =\n",
+ "\n",
+ " -10\n",
+ " 0\n",
+ " 10\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "e=eig(s)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ },
{
"cell_type": "code",
"execution_count": null,
diff --git a/lecture_15/octave-workspace b/lecture_15/octave-workspace
index d68e895..8c437bb 100644
Binary files a/lecture_15/octave-workspace and b/lecture_15/octave-workspace differ
diff --git a/lecture_15/output/00001.png b/lecture_15/output/00001.png
index a7cf7cb..44210b6 100644
Binary files a/lecture_15/output/00001.png and b/lecture_15/output/00001.png differ
diff --git a/lecture_15/output/00002.png b/lecture_15/output/00002.png
index b677760..31a03bb 100644
Binary files a/lecture_15/output/00002.png and b/lecture_15/output/00002.png differ
diff --git a/lecture_15/output/00003.png b/lecture_15/output/00003.png
index cfe1d3c..08cd507 100644
Binary files a/lecture_15/output/00003.png and b/lecture_15/output/00003.png differ
diff --git a/lecture_15/output/00004.png b/lecture_15/output/00004.png
index 94a6914..590a413 100644
Binary files a/lecture_15/output/00004.png and b/lecture_15/output/00004.png differ
diff --git a/lecture_15/output/00005.png b/lecture_15/output/00005.png
index 87c6cc6..240744a 100644
Binary files a/lecture_15/output/00005.png and b/lecture_15/output/00005.png differ
diff --git a/lecture_15/output/00006.png b/lecture_15/output/00006.png
index 2561065..e31a3c7 100644
Binary files a/lecture_15/output/00006.png and b/lecture_15/output/00006.png differ
diff --git a/lecture_15/output/00007.png b/lecture_15/output/00007.png
index a434b00..7ad26e6 100644
Binary files a/lecture_15/output/00007.png and b/lecture_15/output/00007.png differ
diff --git a/lecture_15/output/00008.png b/lecture_15/output/00008.png
index 2ce0439..10bcf68 100644
Binary files a/lecture_15/output/00008.png and b/lecture_15/output/00008.png differ
diff --git a/lecture_15/output/00009.png b/lecture_15/output/00009.png
index c28d3d9..53e6f1c 100644
Binary files a/lecture_15/output/00009.png and b/lecture_15/output/00009.png differ
diff --git a/lecture_15/output/00010.png b/lecture_15/output/00010.png
index 02d6dbe..c78c8ca 100644
Binary files a/lecture_15/output/00010.png and b/lecture_15/output/00010.png differ
diff --git a/lecture_15/output/00011.png b/lecture_15/output/00011.png
index aae545b..430a933 100644
Binary files a/lecture_15/output/00011.png and b/lecture_15/output/00011.png differ
diff --git a/lecture_15/output/00012.png b/lecture_15/output/00012.png
index 59b04a5..c708dd3 100644
Binary files a/lecture_15/output/00012.png and b/lecture_15/output/00012.png differ
diff --git a/lecture_15/output/00013.png b/lecture_15/output/00013.png
index 370ede9..4a25731 100644
Binary files a/lecture_15/output/00013.png and b/lecture_15/output/00013.png differ
diff --git a/lecture_15/output/00014.png b/lecture_15/output/00014.png
index a08c7bf..ea02a38 100644
Binary files a/lecture_15/output/00014.png and b/lecture_15/output/00014.png differ
diff --git a/lecture_15/output/00015.png b/lecture_15/output/00015.png
index bcd3a81..f0f640e 100644
Binary files a/lecture_15/output/00015.png and b/lecture_15/output/00015.png differ
diff --git a/lecture_15/output/00016.png b/lecture_15/output/00016.png
index 57f1768..44f338f 100644
Binary files a/lecture_15/output/00016.png and b/lecture_15/output/00016.png differ
diff --git a/lecture_15/output/00017.png b/lecture_15/output/00017.png
index cf7e47f..056a85b 100644
Binary files a/lecture_15/output/00017.png and b/lecture_15/output/00017.png differ
diff --git a/lecture_15/output/00018.png b/lecture_15/output/00018.png
index df5800a..2bab623 100644
Binary files a/lecture_15/output/00018.png and b/lecture_15/output/00018.png differ
diff --git a/lecture_15/output/00019.png b/lecture_15/output/00019.png
index 949ef0c..9dac5a7 100644
Binary files a/lecture_15/output/00019.png and b/lecture_15/output/00019.png differ
diff --git a/lecture_15/output/00020.png b/lecture_15/output/00020.png
index 7e1396c..1d4ab40 100644
Binary files a/lecture_15/output/00020.png and b/lecture_15/output/00020.png differ
diff --git a/lecture_15/output/00021.png b/lecture_15/output/00021.png
index c20b09f..66eb44d 100644
Binary files a/lecture_15/output/00021.png and b/lecture_15/output/00021.png differ
diff --git a/lecture_15/output/00022.png b/lecture_15/output/00022.png
index 65aad69..fa6fdc8 100644
Binary files a/lecture_15/output/00022.png and b/lecture_15/output/00022.png differ
diff --git a/lecture_15/output/00023.png b/lecture_15/output/00023.png
index 45fff01..aa755e1 100644
Binary files a/lecture_15/output/00023.png and b/lecture_15/output/00023.png differ
diff --git a/lecture_15/output/00024.png b/lecture_15/output/00024.png
index 2239bcb..4e64252 100644
Binary files a/lecture_15/output/00024.png and b/lecture_15/output/00024.png differ
diff --git a/lecture_15/output/00025.png b/lecture_15/output/00025.png
index 84949cc..a2fc1b3 100644
Binary files a/lecture_15/output/00025.png and b/lecture_15/output/00025.png differ
diff --git a/lecture_15/output/00026.png b/lecture_15/output/00026.png
index 4cdc519..041a839 100644
Binary files a/lecture_15/output/00026.png and b/lecture_15/output/00026.png differ
diff --git a/lecture_15/output/00027.png b/lecture_15/output/00027.png
index b5469d5..41a54ff 100644
Binary files a/lecture_15/output/00027.png and b/lecture_15/output/00027.png differ
diff --git a/lecture_15/output/00028.png b/lecture_15/output/00028.png
index 035086e..b6cc8c8 100644
Binary files a/lecture_15/output/00028.png and b/lecture_15/output/00028.png differ
diff --git a/lecture_15/output/00029.png b/lecture_15/output/00029.png
index cb8c951..4c665b8 100644
Binary files a/lecture_15/output/00029.png and b/lecture_15/output/00029.png differ
diff --git a/lecture_15/output/00030.png b/lecture_15/output/00030.png
index 9884fad..71801e9 100644
Binary files a/lecture_15/output/00030.png and b/lecture_15/output/00030.png differ
diff --git a/lecture_15/output/00031.png b/lecture_15/output/00031.png
index 2ffb2cb..a30c5b9 100644
Binary files a/lecture_15/output/00031.png and b/lecture_15/output/00031.png differ
diff --git a/lecture_15/output/00032.png b/lecture_15/output/00032.png
index 39f1eb0..8ef9b30 100644
Binary files a/lecture_15/output/00032.png and b/lecture_15/output/00032.png differ
diff --git a/lecture_15/output/00033.png b/lecture_15/output/00033.png
index 954a5ed..79f8e85 100644
Binary files a/lecture_15/output/00033.png and b/lecture_15/output/00033.png differ
diff --git a/lecture_15/output/00034.png b/lecture_15/output/00034.png
index eea295c..075d85e 100644
Binary files a/lecture_15/output/00034.png and b/lecture_15/output/00034.png differ
diff --git a/lecture_15/output/00035.png b/lecture_15/output/00035.png
index 53757e7..bc73c87 100644
Binary files a/lecture_15/output/00035.png and b/lecture_15/output/00035.png differ
diff --git a/lecture_15/output/00036.png b/lecture_15/output/00036.png
index c52550c..48b5fae 100644
Binary files a/lecture_15/output/00036.png and b/lecture_15/output/00036.png differ
diff --git a/lecture_15/output/00037.png b/lecture_15/output/00037.png
index 1a9936c..7107cfc 100644
Binary files a/lecture_15/output/00037.png and b/lecture_15/output/00037.png differ
diff --git a/lecture_15/output/00038.png b/lecture_15/output/00038.png
index c4a04ea..c9c09b2 100644
Binary files a/lecture_15/output/00038.png and b/lecture_15/output/00038.png differ
diff --git a/lecture_15/output/00039.png b/lecture_15/output/00039.png
index c70e2e9..8755cf3 100644
Binary files a/lecture_15/output/00039.png and b/lecture_15/output/00039.png differ
diff --git a/lecture_15/output/00040.png b/lecture_15/output/00040.png
index 1442e9e..9503926 100644
Binary files a/lecture_15/output/00040.png and b/lecture_15/output/00040.png differ
diff --git a/lecture_15/output/00041.png b/lecture_15/output/00041.png
index 1eaafba..4311d25 100644
Binary files a/lecture_15/output/00041.png and b/lecture_15/output/00041.png differ
diff --git a/lecture_15/output/00042.png b/lecture_15/output/00042.png
index d8dffb0..3ce55af 100644
Binary files a/lecture_15/output/00042.png and b/lecture_15/output/00042.png differ
diff --git a/lecture_15/output/00043.png b/lecture_15/output/00043.png
index c5cd2c9..8c619cf 100644
Binary files a/lecture_15/output/00043.png and b/lecture_15/output/00043.png differ
diff --git a/lecture_15/output/00044.png b/lecture_15/output/00044.png
index 69d7001..2d91fd9 100644
Binary files a/lecture_15/output/00044.png and b/lecture_15/output/00044.png differ
diff --git a/lecture_15/output/00045.png b/lecture_15/output/00045.png
index 17cced2..92e9720 100644
Binary files a/lecture_15/output/00045.png and b/lecture_15/output/00045.png differ
diff --git a/lecture_15/output/00046.png b/lecture_15/output/00046.png
index 2c99b03..62dfa75 100644
Binary files a/lecture_15/output/00046.png and b/lecture_15/output/00046.png differ
diff --git a/lecture_15/output/00047.png b/lecture_15/output/00047.png
index 176533b..b62ac38 100644
Binary files a/lecture_15/output/00047.png and b/lecture_15/output/00047.png differ
diff --git a/lecture_15/output/00048.png b/lecture_15/output/00048.png
index aff509e..0b90065 100644
Binary files a/lecture_15/output/00048.png and b/lecture_15/output/00048.png differ
diff --git a/lecture_15/output/00049.png b/lecture_15/output/00049.png
index df6d8ed..f7510c0 100644
Binary files a/lecture_15/output/00049.png and b/lecture_15/output/00049.png differ
diff --git a/lecture_15/output/00050.png b/lecture_15/output/00050.png
index d32de4e..2c74c37 100644
Binary files a/lecture_15/output/00050.png and b/lecture_15/output/00050.png differ
diff --git a/lecture_15/output/00051.png b/lecture_15/output/00051.png
index be78dbb..daabdee 100644
Binary files a/lecture_15/output/00051.png and b/lecture_15/output/00051.png differ
diff --git a/lecture_15/output/00052.png b/lecture_15/output/00052.png
index 04f3ee7..15fb10c 100644
Binary files a/lecture_15/output/00052.png and b/lecture_15/output/00052.png differ
diff --git a/lecture_15/output/00053.png b/lecture_15/output/00053.png
index 01637cb..07fb58c 100644
Binary files a/lecture_15/output/00053.png and b/lecture_15/output/00053.png differ
diff --git a/lecture_15/output/00054.png b/lecture_15/output/00054.png
index 293e0f5..7bc6b82 100644
Binary files a/lecture_15/output/00054.png and b/lecture_15/output/00054.png differ
diff --git a/lecture_15/output/00055.png b/lecture_15/output/00055.png
index 0722663..52df944 100644
Binary files a/lecture_15/output/00055.png and b/lecture_15/output/00055.png differ
diff --git a/lecture_15/output/00056.png b/lecture_15/output/00056.png
index 4da0215..1677817 100644
Binary files a/lecture_15/output/00056.png and b/lecture_15/output/00056.png differ
diff --git a/lecture_15/output/00057.png b/lecture_15/output/00057.png
index 4bf29a5..c4032a1 100644
Binary files a/lecture_15/output/00057.png and b/lecture_15/output/00057.png differ
diff --git a/lecture_15/output/00058.png b/lecture_15/output/00058.png
index d8a0313..3afae58 100644
Binary files a/lecture_15/output/00058.png and b/lecture_15/output/00058.png differ
diff --git a/lecture_15/output/00059.png b/lecture_15/output/00059.png
index 438e6e7..9e18362 100644
Binary files a/lecture_15/output/00059.png and b/lecture_15/output/00059.png differ
diff --git a/lecture_15/output/00060.png b/lecture_15/output/00060.png
index 210926d..47af589 100644
Binary files a/lecture_15/output/00060.png and b/lecture_15/output/00060.png differ
diff --git a/lecture_15/output/00061.png b/lecture_15/output/00061.png
index 4d449ec..b12af4a 100644
Binary files a/lecture_15/output/00061.png and b/lecture_15/output/00061.png differ
diff --git a/lecture_15/output/00062.png b/lecture_15/output/00062.png
index 0c693a1..0999e97 100644
Binary files a/lecture_15/output/00062.png and b/lecture_15/output/00062.png differ
diff --git a/lecture_15/output/00063.png b/lecture_15/output/00063.png
index e83420e..5287e29 100644
Binary files a/lecture_15/output/00063.png and b/lecture_15/output/00063.png differ
diff --git a/lecture_15/output/00064.png b/lecture_15/output/00064.png
index 1c19582..bbad872 100644
Binary files a/lecture_15/output/00064.png and b/lecture_15/output/00064.png differ
diff --git a/lecture_15/output/00065.png b/lecture_15/output/00065.png
index 02042ea..61d2fe1 100644
Binary files a/lecture_15/output/00065.png and b/lecture_15/output/00065.png differ
diff --git a/lecture_15/output/00066.png b/lecture_15/output/00066.png
index 44dc2a1..a1b9eeb 100644
Binary files a/lecture_15/output/00066.png and b/lecture_15/output/00066.png differ
diff --git a/lecture_15/output/00067.png b/lecture_15/output/00067.png
index 1a0e527..67ccce3 100644
Binary files a/lecture_15/output/00067.png and b/lecture_15/output/00067.png differ
diff --git a/lecture_15/output/00068.png b/lecture_15/output/00068.png
index 9bd826d..50c4da5 100644
Binary files a/lecture_15/output/00068.png and b/lecture_15/output/00068.png differ
diff --git a/lecture_15/output/00069.png b/lecture_15/output/00069.png
index f5453ca..790f009 100644
Binary files a/lecture_15/output/00069.png and b/lecture_15/output/00069.png differ
diff --git a/lecture_15/output/00070.png b/lecture_15/output/00070.png
index c3ae83f..350e64a 100644
Binary files a/lecture_15/output/00070.png and b/lecture_15/output/00070.png differ
diff --git a/lecture_15/output/00071.png b/lecture_15/output/00071.png
index e118a6a..d4d54b0 100644
Binary files a/lecture_15/output/00071.png and b/lecture_15/output/00071.png differ
diff --git a/lecture_15/output/00072.png b/lecture_15/output/00072.png
index 685165c..146d82f 100644
Binary files a/lecture_15/output/00072.png and b/lecture_15/output/00072.png differ
diff --git a/lecture_15/output/00073.png b/lecture_15/output/00073.png
index 8098077..cee2012 100644
Binary files a/lecture_15/output/00073.png and b/lecture_15/output/00073.png differ
diff --git a/lecture_15/output/00074.png b/lecture_15/output/00074.png
index ca3b66d..b762ee1 100644
Binary files a/lecture_15/output/00074.png and b/lecture_15/output/00074.png differ
diff --git a/lecture_15/output/00075.png b/lecture_15/output/00075.png
index 5433bce..59f5ee9 100644
Binary files a/lecture_15/output/00075.png and b/lecture_15/output/00075.png differ
diff --git a/lecture_15/output/00076.png b/lecture_15/output/00076.png
index 4fa4b28..59c0066 100644
Binary files a/lecture_15/output/00076.png and b/lecture_15/output/00076.png differ
diff --git a/lecture_15/output/00077.png b/lecture_15/output/00077.png
index eb216f5..6048a1c 100644
Binary files a/lecture_15/output/00077.png and b/lecture_15/output/00077.png differ
diff --git a/lecture_15/output/00078.png b/lecture_15/output/00078.png
index 73ff651..4473c93 100644
Binary files a/lecture_15/output/00078.png and b/lecture_15/output/00078.png differ
diff --git a/lecture_15/output/00079.png b/lecture_15/output/00079.png
index 54bc866..7a6335a 100644
Binary files a/lecture_15/output/00079.png and b/lecture_15/output/00079.png differ
diff --git a/lecture_15/output/00080.png b/lecture_15/output/00080.png
index 0bcc237..821076d 100644
Binary files a/lecture_15/output/00080.png and b/lecture_15/output/00080.png differ
diff --git a/lecture_15/output/00081.png b/lecture_15/output/00081.png
index b6b2406..d36a35c 100644
Binary files a/lecture_15/output/00081.png and b/lecture_15/output/00081.png differ
diff --git a/lecture_15/output/00082.png b/lecture_15/output/00082.png
index 7212257..bde9280 100644
Binary files a/lecture_15/output/00082.png and b/lecture_15/output/00082.png differ
diff --git a/lecture_15/output/00083.png b/lecture_15/output/00083.png
index 6eae390..1691529 100644
Binary files a/lecture_15/output/00083.png and b/lecture_15/output/00083.png differ
diff --git a/lecture_15/output/00084.png b/lecture_15/output/00084.png
index 4e03cc7..5adfef2 100644
Binary files a/lecture_15/output/00084.png and b/lecture_15/output/00084.png differ
diff --git a/lecture_15/output/00085.png b/lecture_15/output/00085.png
index c212a71..02067f8 100644
Binary files a/lecture_15/output/00085.png and b/lecture_15/output/00085.png differ
diff --git a/lecture_15/output/00086.png b/lecture_15/output/00086.png
index eda45fa..2dfc5ac 100644
Binary files a/lecture_15/output/00086.png and b/lecture_15/output/00086.png differ
diff --git a/lecture_15/output/00087.png b/lecture_15/output/00087.png
index 131c816..a955fd7 100644
Binary files a/lecture_15/output/00087.png and b/lecture_15/output/00087.png differ
diff --git a/lecture_15/output/00088.png b/lecture_15/output/00088.png
index aeb4157..7b38164 100644
Binary files a/lecture_15/output/00088.png and b/lecture_15/output/00088.png differ
diff --git a/lecture_15/output/00089.png b/lecture_15/output/00089.png
index 9b45340..2c75b0f 100644
Binary files a/lecture_15/output/00089.png and b/lecture_15/output/00089.png differ
diff --git a/lecture_15/output/00090.png b/lecture_15/output/00090.png
index a4cd16d..e4489e6 100644
Binary files a/lecture_15/output/00090.png and b/lecture_15/output/00090.png differ
diff --git a/lecture_15/output/00091.png b/lecture_15/output/00091.png
index 7d1b812..af5d877 100644
Binary files a/lecture_15/output/00091.png and b/lecture_15/output/00091.png differ
diff --git a/lecture_15/output/00092.png b/lecture_15/output/00092.png
index 81a2827..ab960d1 100644
Binary files a/lecture_15/output/00092.png and b/lecture_15/output/00092.png differ
diff --git a/lecture_15/output/00093.png b/lecture_15/output/00093.png
index 5244a75..81c02c0 100644
Binary files a/lecture_15/output/00093.png and b/lecture_15/output/00093.png differ
diff --git a/lecture_15/output/00094.png b/lecture_15/output/00094.png
index f896bd9..850739f 100644
Binary files a/lecture_15/output/00094.png and b/lecture_15/output/00094.png differ
diff --git a/lecture_15/output/00095.png b/lecture_15/output/00095.png
index 1560ca3..41d354d 100644
Binary files a/lecture_15/output/00095.png and b/lecture_15/output/00095.png differ
diff --git a/lecture_15/output/00096.png b/lecture_15/output/00096.png
index dc22858..7149da5 100644
Binary files a/lecture_15/output/00096.png and b/lecture_15/output/00096.png differ
diff --git a/lecture_15/output/00097.png b/lecture_15/output/00097.png
index 2052cf2..a7bc3f4 100644
Binary files a/lecture_15/output/00097.png and b/lecture_15/output/00097.png differ
diff --git a/lecture_15/output/00098.png b/lecture_15/output/00098.png
index e3a52b9..119aaef 100644
Binary files a/lecture_15/output/00098.png and b/lecture_15/output/00098.png differ
diff --git a/lecture_15/output/00099.png b/lecture_15/output/00099.png
index 4b6a5e2..f6f7b8a 100644
Binary files a/lecture_15/output/00099.png and b/lecture_15/output/00099.png differ
diff --git a/lecture_15/output/00100.png b/lecture_15/output/00100.png
index 945a4ef..8d37137 100644
Binary files a/lecture_15/output/00100.png and b/lecture_15/output/00100.png differ
diff --git "a/lecture_15/\340\244\267\001" "b/lecture_15/\340\244\267\001"
new file mode 100644
index 0000000..e69de29
diff --git "a/lecture_15/\360&\341\001" "b/lecture_15/\360&\341\001"
new file mode 100644
index 0000000..e69de29
diff --git a/lecture_16/.ipynb_checkpoints/lecture_16-checkpoint.ipynb b/lecture_16/.ipynb_checkpoints/lecture_16-checkpoint.ipynb
new file mode 100644
index 0000000..2fd6442
--- /dev/null
+++ b/lecture_16/.ipynb_checkpoints/lecture_16-checkpoint.ipynb
@@ -0,0 +1,6 @@
+{
+ "cells": [],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
diff --git a/lecture_16/compiled_data.csv b/lecture_16/compiled_data.csv
new file mode 100644
index 0000000..ea6a99a
--- /dev/null
+++ b/lecture_16/compiled_data.csv
@@ -0,0 +1,233 @@
+7.8,62,1
+12.3,61,1
+5.2,35,1
+12.4,44,1
+5.2,294,1
+3.3,73,2
+1.4,30,2
+11,10,2
+6.3,39,3
+6.9,60,3
+6.3,100,3
+7.8,249,3
+3.3,282,3
+7,96,4
+3.9,186,4
+2.95,166,4
+8.6,262,4
+2.5,355,4
+20,155,5
+18.5,225,5
+14,45,5
+8.5,340,5
+5.25,95,5
+10,20,5
+6.5,62,5
+8.75,36,5
+3,190,5
+4.5,280,5
+2.25,62,6
+3.9,312,6
+9.3,36,6
+1.9,154,6
+7.3,115,6
+4.75,298,6
+4.6,306,7
+2.3,282,7
+10.1,138,7
+3.3,180,7
+8.5,242,7
+5,10,8
+2.5,350,8
+11,30,8
+4,272,8
+17,38,8
+3.75,85,9
+4.5,102,9
+1.36,118,9
+0.78,157,9
+3.41,198,9
+3,27,10
+1,88,10
+2,20,10
+2.5,155,10
+4.5,281,10
+1.5,75,10
+6.32,70,10
+2.85,135,10
+3.71,250,10
+5.45,60,10
+6.1,95,10
+5.5,92,11
+15,266,11
+12.5,14,11
+7,120,11
+4,132,11
+9,30,12
+5,90,12
+6,350,12
+8,330,12
+5,60,12
+3.81,140,12
+6.35,116,12
+0.635,88,12
+7.62,12,12
+1.27,180,12
+4.2,292,13
+0.8,165,13
+2.5,0,13
+6,43,13
+6.65,317,13
+1,0,13
+2.9,50,13
+7.4,302,13
+16.6,246,13
+2.4,234,13
+0.8,100,14
+3.6,62,14
+3.5,260,14
+4.4,168,14
+5.7,178,14
+3.6,143,14
+1.75,37,14
+1.95,62,14
+2.27,48,14
+4.26,69,14
+4,182,15
+5.8,100,15
+8.3,45,15
+10.2,30,15
+4,278,15
+3.81,120,16
+7.62,77,16
+1.59,212,16
+3.73,265,16
+4.84,259,16
+3.45,243,16
+2.1,186,16
+4.6,24,16
+0.7,343,16
+1.7,211,16
+12.4,33,17
+13.9,103,17
+4.5,307,17
+6.7,313,17
+11.4,328,17
+3,240,18
+4,330,18
+2,90,18
+3.5,315,18
+1,15,18
+4.6,98,19
+3.8,326,19
+3.4,184,19
+4,48,19
+2.6,83,19
+2.75,88,20
+1.33,93,20
+1.5,12,20
+3,280,20
+0.5,24,20
+1.2,130,21
+2.6,122,21
+0.8,296,21
+1.4,100,21
+1.2,290,21
+3,90,22
+2,30,22
+10,90,22
+3,15,22
+7,90,22
+3.3,170,23
+8.8,95,23
+8.1,71,23
+7.7,48,23
+9.6,301,23
+3,70,24
+1.2,10,24
+2.1,15,24
+6,260,24
+0.7,30,24
+12.5,10,25
+11,35,25
+7,320,25
+7.5,292,25
+3.5,134,25
+1,4,26
+2,3.9,26
+3,5.25,26
+4,3.2,26
+5,3,26
+4.5,27,27
+1.1,80,27
+2.6,155,27
+1.9,200,27
+2.8,325,27
+4.3,15,28
+7,145,28
+3.5,80,28
+9,210,28
+5.2,175,28
+1,54,29
+3.5,128,29
+4.5,140,29
+2,54,29
+11,274,29
+3.175,98,30
+1.5875,30,30
+3.175,282,30
+5.08,318,30
+10.795,316,30
+11.2,19,31
+14.5,232,31
+12.3,271,31
+16.9,120,31
+9,177,31
+7.4,276,32
+11.5,321,32
+1.5,36,32
+7.5,22,32
+10.1,66,32
+1.75,10,33
+2.5,123,33
+2,64,33
+1.8,271,33
+4,308,33
+4.5,39,34
+3.25,68,34
+2.5,282,34
+1.25,108,34
+2,122,34
+3.97,18,35
+8.29,196,35
+15.52,232,35
+4.79,93,35
+6.43,153,35
+7.5,74,36
+10.75,86,36
+3.5,96,36
+6.25,172,36
+5.5,38,36
+3.25,192,37
+4.5,88,37
+5,336,37
+4,176,37
+2.5,194,37
+1.5,73,38
+1.33,265,38
+2.15,92,38
+3.5,130,38
+0.9,65,38
+3.75,-2,39
+1.66,89,39
+5.43,76,39
+4.12,54,39
+6.87,63,39
+10,85,40
+9,30,40
+7,180,40
+4.3,22,40
+5.8,281,40
+2.9,1,40
+3.31,29,40
+1.5,10,40
diff --git a/lecture_16/lecture_16.ipynb b/lecture_16/lecture_16.ipynb
new file mode 100644
index 0000000..74bdda2
--- /dev/null
+++ b/lecture_16/lecture_16.ipynb
@@ -0,0 +1,54 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Curve-Fitting\n",
+ "## Linear Regression\n",
+ "\n",
+ "Often, we have a model with empirical parameters. (e.g. Young's modulus, Poisson's ratio, drag coefficient, coefficient of restitution, spring constant)\n",
+ "\n",
+ "Experimental measurements are prone to a number of stochastic (random) factors:\n",
+ "\n",
+ "- Environmental noise\n",
+ " \n",
+ "- Measurement Uncertainty\n",
+ " \n",
+ "- Factors not accounted in model (e.g. 2D effects of 1D approximation)\n",
+ "\n",
+ "These can lead to **noise** (lack of precision) and **bias** (lack of accuracy)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Octave",
+ "language": "octave",
+ "name": "octave"
+ },
+ "language_info": {
+ "file_extension": ".m",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "octave",
+ "version": "0.19.14"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
diff --git a/lecture_16/octave-workspace b/lecture_16/octave-workspace
new file mode 100644
index 0000000..8c437bb
Binary files /dev/null and b/lecture_16/octave-workspace differ