|
From: | Mike Miller |
Subject: | Re: saving Octave state? |
Date: | Thu, 2 Dec 2010 15:02:36 -0600 (CST) |
User-agent: | Alpine 2.00 (DEB 1167 2008-08-23) |
On Thu, 2 Dec 2010, Judd Storrs wrote:
On Thu, Dec 2, 2010 at 3:04 PM, Mike Miller <address@hidden> wrote:function save_odata () save("-binary", ".OData") endfunctionThe problem (I think) is that the save() runs in the function scope instead of the base. I think this change works: function save_odata () evalin("base","save('-binary', '.OData')") ; endfunction
Yes! Thanks. That worked. For now I've added these functions to my ~/.octaverc:
function save_odata () evalin("base","save('-binary', '.OData')") ; endfunction atexit ("save_odata"); function quit2 () atexit ("save_odata", false); quit endfunctionSo save_odata will save all data in binary format in .OData, and this will be executed automatically on exit, but if I use quit2 instead of quit to exit, the data are not saved.
I'll do some more work on this in the next week or two and then I'll post my final conclusions both here and on the R-Help list.
Mike
[Prev in Thread] | Current Thread | [Next in Thread] |