title: How to create a log file in Matlab
body: <p>I have inherited multiple scripts in Matlab and sometimes it's tricky to trace where the execution is happening. I would like to create a log file to show where it is in the execution, show warnings and show errors and date and time stamps. [Note: I'm using Matlab R2012a].</p>