MATLAB Diary from aiQUANT
by theorangedog on Nov.03, 2007, under Skills
aiQUANT has an older post that discusses the MATLAB diary. The post also discusses the startup script that aiQUANT uses. For future reference, the post is reprinted below:
Have you ever been frustrated with Matlab when you forget that longwinded command sequence that took ages to get just right and would like to use again, but you didn’t write it down! The Matlab diary helps alleviate this problem. Basically it copies all typed input, and textual output in the command window into a file that you can refer back to at a later date.
To setup the diary such that you get 1 file for each day you use Matlab:
- Create a directory in which to store your diary files.
- Add the following line to your startup.m file:
Note, one thing to be aware of is that if you accidentally display a large matrix, it will get added to your diary, so the files can get rather large. Here’s an example of what’s in my startup script:
% Add commonly used paths here
Addpath(‘d:nameMatlab‘);
% Add commonly used paths here
Addpath(‘d:myNameMatlab‘);
% Configure the diary to store today’s Matlab session in
% This helps alleviate some Matlab bugs to do with plotting coloured surfaces
opengl neverselect;
% Change to my current working project directory
cd ‘pathNameHere‘;




November 4th, 2007 on 3:56 am
Is this you Rod?
November 4th, 2007 on 11:22 am
no, but if you’re referring to rod. from Reasonable Deviations, I’m a big fan of his site. I thought this was a great post of yours - I haven’t heard of the the MATLAB diary and wanted to save a reference for future use. hope you don’t mind.
November 6th, 2007 on 3:28 am
Offcourse I dont mind. I’ve added you to my blogroll… so as to share valuable traffic. Cheers!