[Top][All Lists]

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

Re: Starting Octave Windows XP

From: Michael Goffioul
Subject: Re: Starting Octave Windows XP
Date: Fri, 8 Feb 2008 06:22:55 +0100

On 2/8/08, Michael J. McCann <address@hidden> wrote:
> I have just installed Octave. I had been introduced to Matlab
> (R2007a) but can't use it now. Octave seems to be an alternative.
>         Doing calculations at the command line is OK,
> BUT to be useful I need to store code and retrieve it on a project by
> project basis.
> I have never used UNIX etc so all references to its workings are
> meaningless. DOS commands no longer make sense and I can't get then
> to work in the command window anyway. Things like >CD .. etc produce
> no response.
> I can't see any instructions that allow me to save ".m" files where I
> can later get at them (e.g somewhere in "My Documents" ) nor a means
> to bring them back or use them again. The "path" instruction is no
> help as it doesn't yield any useable information. The working
> directory is referred to in the help files but not where it is nor
> how to select it. I need to be able to keep a collection of files for
> each project in its own folder (working directory I presume).

You're probably looking for "pwd" and "addpath". "pwd" returns the
current working directory (equivalent of CD under DOS). "addpath"
allows you to add a path to octave search path (you can see the
current octave search path by using "path"). This search path is
a list of dirctories that octave will use when looking for .m/.oct files.

For instance, if you saved a file named fun1.m at this location:
C:\MyDir\fun1.m, then you can add this directory to search path

addpath ('C:\MyDir')

Afterwards, you can access your function normally:

fun1 (...)
edit fun1


reply via email to

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