The matlab snippets I used in my research projects.