Issue #5 solved. Make use of the second chain. More efficient.
Add an m-file for result analysis.