Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how to make command history permanent?
Date: Tue, 3 Jun 2008 09:26:43 -0400
Organization: The MathWorks, Inc.
Lines: 41
Message-ID: <g23gqj$8qb$1@fred.mathworks.com>
References: <g21skv$vhc$1@news.stanford.edu> <86752402-6902-4f73-bf7d-429ac8b16771@s50g2000hsb.googlegroups.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1212499603 9035 144.212.105.187 (3 Jun 2008 13:26:43 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 3 Jun 2008 13:26:43 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
Xref: news.mathworks.com comp.soft-sys.matlab:471963




"Rune Allnor" <allnor@tele.ntnu.no> wrote in message 
news:86752402-6902-4f73-bf7d-429ac8b16771@s50g2000hsb.googlegroups.com...
> On 3 Jun, 00:36, "huhua" <lunamoonm...@gmail.com> wrote:
>> Hi all,
>>
>> The current Matlab command history window only keeps a small number of
>> command histories. Is there a way to make all the history entries kept
>> permanently?

No, not unless you make a backup copy of the M-file in your PREFDIR that 
contains the command history periodically.

> Maybe not exactly what you want, but something
> close. In the mid/late '90s I used to use the
> DIARY to save my commands.
>
> You can do something like this in startup.m:
>
> diaryname=['matlab-session-log-',date];
> diary(diaryname);
> clear diaryname;
>
> Everything that goes on in the command window
> is mow logged to the specified file, including
> output as well as commands.

You can do something similar when you start MATLAB by using the -logfile 
option.

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/matlabwindows.html

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/matlabunix.html

*snip*

-- 
Steve Lord
slord@mathworks.com