octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octaverc and version in path?


From: Ben Abbott
Subject: Re: octaverc and version in path?
Date: Mon, 31 Dec 2007 12:30:42 +0800


On Dec 31, 2007, at 1:12 AM, Ben Abbott wrote:


On Dec 31, 2007, at 12:49 AM, John W. Eaton wrote:

The savepath function only exists for compatibility with Matlab, so
whatever it does should be compatible.

jwe

Good point.


I've spent some time looking over the differences between Matlab and Octave regarding path related functions. I've enumerated what I found below.

(1) pathdef: In Octave, pathdef() load's the virgin default path. In Matlab pathdef.m is a script created by savepath.m, and pathdef.m is used to setup Matlab's path each time Matlab is run.

(2) savepath: In Octave, savepath.m saves to current working path to ~/.octaverc. In Matlab, it saves the current working path to pathdef.m. On my Mac, Matlab doesn't require admin access to execute savepath.m ... Can someone tell us if it does on Linux?

(3) restoredefaultpath: In Matlab this allows a user to restore the working path to its virgin form. It only impacts the current session. In Octave, this may be done by path (pathdef);

(4) matlabroot: In Matlab this returns the path to the root of Matlab's installation directory. The Octave equivalent is OCTAVE_HOME.

(5) matlabrc: In Matlab matlabrc.m is supposed to have admin access (?) and is run each time Matlab is started. It is located in <matlabroot>/toolbox/local. The Octave equivalent is octaverc located in octave-home/share/octave/version/m/startup.

(6) startup: In Matlab startup.m is run (if it exists in the path) each time Matlab is started, but only after matlabrc.m. The Octave equilvalent is ~/.octaverc.

(7) finish: In Matlab finish.m is run upon a clean exit. From what I can tell there is no Octave equivalent.

There are many differences. Some will require changes to c-code while the majority require changes to m-files.

I'm up to the task of handling the m-files but will need someone to take on the c part.

If it is desirable and appropriate to reconcile these differences, I can put together an approach that will allow for incremental changes that ensures a functional Octave.

I'll get started on the sequence of events needed. In the meantime, I'm eager for feedback so that I'm not wasting effort and/or time.

Ben





reply via email to

[Prev in Thread] Current Thread [Next in Thread]