# Week 1 - Ordinary Differential and Difference Equations

From class review - To solve this the reasoning for taking the determinant above is a little wrong. You should take det(M-Ih)=0 to get the eigenvalues and then use those to calculate the eigenvectors.

## Notes on embedding Jupyter Notebooks into your page

### Option 1 - Embed inline

First convert your notebook into an HTML file:

`ipython nbconvert notebook_name.ipynb`

(If you're using Python 3 then you will need to install nbconvert using pip3 and run a slightly different command.)
`jupyter nbconvert notebook_name.ipynb`

You can copy and paste this code straight into your page however there tends to be a lot of stuff so I like to keep mine as a separate HTML file and embed this into my page. You can do this by adding a function into the header which loads the notebook HTML file. Include the following function in the header:

`<script>`
`\$(function(){`
` \$( "#notebook1" ).load( "notebook_name.html")`
` });`
`</script>`

Then you can include the HTML by assigning the id to a div:

`<div id="notebook1"></div>`

The only issue is that Chrome prevents access to the local file system using this method, therefore you can only view changes locally by using Firefox or running a local server. Though, once you push you code to the repo, it displays properly. Easiest to understand what's going on by opening up the Chrome developer tools and having a poke around.

### Option 2 - iframe

This creates a window within your page to let you scroll through the notebook, useful if you've got a really long notebook and you don't want to include the whole length of it in your page. First of all, convert your notebook into HTML as described above. Then include it using the following code:

`<iframe src="week1.html" style="float: left; width:90%; margin-left: 5%; height:600"></iframe>`