completed ex4 except for most important part and plot
ex1+3 almost done (not tested and run), will be completed tonight
Merge branch 'master' of https://github.com/ianda/imageanalysis

merge with cs version