This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
gibson:teaching:fall-2012:math445:pf1 [2012/12/05 12:33] gibson |
gibson:teaching:fall-2012:math445:pf1 [2012/12/05 13:23] (current) gibson |
||
|---|---|---|---|
| Line 40: | Line 40: | ||
| network of websites. | network of websites. | ||
| - | <network-of-links figure here> | + | {{:gibson:teaching:fall-2012:math445:network2.png?direct&300}} |
| 15. Write Matlab code that converts the connectivity matrix //C// to a | 15. Write Matlab code that converts the connectivity matrix //C// to a | ||
| Line 53: | Line 52: | ||
| - | 17. Write an equation for //y// as a function of //x// for | + | 17. Write an equation for //y// as a function of //x// for |
| - | the following data plot | + | the following data plot. Bonus: express exponential functions |
| + | as powers of //e// rather than powers of 10. Use $e^{2.3}\approx 10$ | ||
| + | to convert between the two. | ||
| + | |||
| + | {{:gibson:teaching:fall-2012:math445:fig1.png?direct&300}} | ||
| - | <data plot goes here> | ||
| Line 93: | Line 95: | ||
| where $g = 9.81, ~\mu =0.35$, $y$ represents the vertical position, and | where $g = 9.81, ~\mu =0.35$, $y$ represents the vertical position, and | ||
| $v_y$ represents the vertical velocity. Represent the two free variables | $v_y$ represents the vertical velocity. Represent the two free variables | ||
| - | with the vector $x = [y, v_y]$ and reexpress the two equations above as | + | with the vector $x = [y, ~v_y]$ and reexpress the two equations above as |
| an ODE system of the form | an ODE system of the form | ||
| $dx/dt = f(x)$ | $dx/dt = f(x)$ | ||
| - | Note that both sides of this equation are vectors: $dx/dt = [dx_1/dt, dx_2/dt]$ and | + | Note that both sides of this equation are vectors: $dx/dt = [dx_1/dt, ~dx_2/dt]$ and |
| - | $f(x) = [f_1(x_1, x_2), f_2(x_1, x2)]$. Your job is to find the functions $f_1$ and $f_2$. | + | $f(x) = [f_1(x_1, x_2), ~f_2(x_1, x_2)]$. Your job is to find the functions $f_1$ and $f_2$. |
| Write an anonymous function in Matlab that computes $dx/dt = f(x)$ for an input vector $x$, | Write an anonymous function in Matlab that computes $dx/dt = f(x)$ for an input vector $x$, | ||
| Line 115: | Line 117: | ||
| <latex> | <latex> | ||
| - | y_i = \sum_{j=1} A_{ij} x_j | + | y_i = \sum_{j=1}^N A_{ij} x_j |
| </latex> | </latex> | ||
| - | for each component $y_i$ of the //M// dimensional vector $y$. But don't that | + | for each component $y_i$ of the //M// dimensional vector $y$. But don't code that |
| - | formula directly! Instead start your code with | + | formula directly! Instead start your function with |
| <code> | <code> | ||
| Line 126: | Line 128: | ||
| </code> | </code> | ||
| - | and write the matrix-vector multiplication as a loop over the $K$ nonzero elements | + | and write the matrix-vector multiplication as a loop over the K nonzero elements |
| - | of $A$. | + | of A. |