Search path for .m files:help

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Search path for .m files:help

Antonio Capobianco-3
Hi,
I am using octave 2.05 for OS/2.
The problem I have is the following:
If I start octave from my working directory and give the command:
test.m, the m-file is not found; I have to put it in some subdir.
of scripts directory.
There is the way to tell octave to search also in the present working
directory ?

thanks

A. Capobianco


Reply | Threaded
Open this post in threaded view
|

Re: Search path for .m files:help

gebhardt
Hi,

 > Hi, I am using octave 2.05 for OS/2.  The problem I have is the
 > following: If I start octave from my working directory and give the
 > command: test.m, the m-file is not found; I have to put it in some
 > subdir.  of scripts directory.  There is the way to tell octave to
 > search also in the present working directory ?

Octave searches in the directories specified in the variable LOADPATH.
Add the following line in your .octaverc file:

LOADPATH = strcat (".;", LOADPATH);

Klaus Gebhardt [TEAM OS/2]


Reply | Threaded
Open this post in threaded view
|

Search path for .m files:help

John W. Eaton-6
In reply to this post by Antonio Capobianco-3
On  4-Apr-1997, Antonio Capobianco <[hidden email]> wrote:

| I am using octave 2.05 for OS/2.
| The problem I have is the following:
| If I start octave from my working directory and give the command:
| test.m, the m-file is not found; I have to put it in some subdir.
| of scripts directory.
| There is the way to tell octave to search also in the present working
| directory ?

Octave should search the current directory by default.  If you set
LOADPATH to

  ~/octave//:

it will search your ~/octave directory (and all the subdirectories it
contains) followed by the default path (which includes the current
directory).  However, if you omit the trailing colon, it will only
search in the ~/octave directory tree.

See the documentation for the LOADPATH variable for more information.

jwe