Chapter 1 update

First complete draft. Written without Matlab on my PC. Needs checking.