Comments on: If You Know Your History, You Can Repeat It https://blogs.mathworks.com/community/2011/08/08/if-you-know-your-history-you-can-repeat-it/?s_tid=feedtopost News from the intersection of MATLAB, Community, and the web. Wed, 23 May 2012 19:20:59 +0000 hourly 1 https://wordpress.org/?v=6.2.2 By: Josh https://blogs.mathworks.com/community/2011/08/08/if-you-know-your-history-you-can-repeat-it/#comment-9113 Wed, 23 May 2012 19:20:59 +0000 https://blogs.mathworks.com/desktop/2011/08/08/if-you-know-your-history-you-can-repeat-it/#comment-9113 I just add this to my startup.m file:

if sum(get(0,’ScreenSize’))>4
diaryname=[datestr(fix(clock),’yyyy-mm-dd HHMM’),’.log’];
diary(diaryname);
clear diaryname;
end

Complete history per session saved in a log file. Easy to use your OS’s search functionality to locate specific parts. One annoyance is that it captures the output as well (forgot to put a semicolon? have a bunch of debug/progress statements? That’ll put lots of junk in those logs). But the output can be useful at times, and I’m certainly not lacking drive space…

I test the screensize so that I avoid generating logs for MATLAB “sessions” that were just started to run a few things and return results for external scripts. I only want the logs for the sessions where I’m doing the typing.

]]>
By: Mike https://blogs.mathworks.com/community/2011/08/08/if-you-know-your-history-you-can-repeat-it/#comment-8001 Mon, 15 Aug 2011 13:51:05 +0000 https://blogs.mathworks.com/desktop/2011/08/08/if-you-know-your-history-you-can-repeat-it/#comment-8001 @Yair,

Thanks for the feedback. I’ll let the history team know.

]]>
By: Yair Altman https://blogs.mathworks.com/community/2011/08/08/if-you-know-your-history-you-can-repeat-it/#comment-7992 Thu, 11 Aug 2011 07:42:15 +0000 https://blogs.mathworks.com/desktop/2011/08/08/if-you-know-your-history-you-can-repeat-it/#comment-7992 I use the command history very frequently in my work. One limitation that has annoyed me for many years is its hard-coded max storage size of 30KB, if I remember correctly. In this day and age when memory and disk space are measured in GB, I would really like to have the ability to increase this size.

]]>