Add matlab files by maehw

This closes #1 and closes #4 and closes #5 and closes #6 and closes #7
and closes #8 and closes #9 and closes #10 and closes #11 and closes #12
and closes #13 and closes #14.