From f6289c944f85d98d9871f66c88959ebafc45b3f2 Mon Sep 17 00:00:00 2001 From: "Ryan C. Cooper" Date: Thu, 28 Sep 2017 10:26:04 -0400 Subject: [PATCH] added force eqn to HW2 --- HW2/README.html | 4 ++-- HW2/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/HW2/README.html b/HW2/README.html index 078c879..1e1563a 100644 --- a/HW2/README.html +++ b/HW2/README.html @@ -65,11 +65,11 @@

eq4

\(E_{total}(\Delta x)=E_{LJ}(x_{0}+\Delta x)-F\Delta x\).

-

Where \(x_{0}\) is the distance between atoms with no force applied and dx is the amount each gold atom has moved under a given force, F.

+

Where x0 is the distance between atoms with no force applied and dx is the amount each gold atom has moved under a given force, F.

  1. Determine x0 when F=0 nN using the golden ratio and parabolic methods. Show your script and output in your README and include your functions

  2. Solve for dx is the amount each gold atom has mov for F=0 to 0.0022 nN with 30 steps. *Use the golden ratio solver or the matlab/octave fminsearch

  3. -
  4. create a sum of squares error function sse_of_parabola.m that calculates the sum of squares error between a function \(F(x)=K_{1}\Delta x+1/2K_{2}\Delta x^{2}\) and the Forces used in part B for each dx.

  5. +
  6. create a sum of squares error function sse_of_parabola.m that calculates the sum of squares error between a function F(x) \(F(x)=K_{1}\Delta x+1/2K_{2}\Delta x^{2}\) and the Forces used in part B for each dx.

  7. Use the fminsearch matlab/octave function to determine k1k2.

  8. Plot the force vs calculated dx and the best-fit parabola using k1k2 in part d.

diff --git a/HW2/README.md b/HW2/README.md index 0b5d703..ba32247 100644 --- a/HW2/README.md +++ b/HW2/README.md @@ -97,7 +97,7 @@ described by the Lennard-Jones potential as such solver or the matlab/octave `fminsearch` c. create a sum of squares error function `sse_of_parabola.m` that calculates the sum of - squares error between a function $F(x)=K_{1}\Delta x+1/2K_{2}\Delta x^{2}$ and the + squares error between a function ![F(x)](./equations/fx.png) $F(x)=K_{1}\Delta x+1/2K_{2}\Delta x^{2}$ and the Forces used in part B for each ![dx](./equations/deltax.png). d. Use the `fminsearch` matlab/octave function to determine