help-octave
[Top][All Lists]
Advanced

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

Octave's PATH not like Matlab's?


From: John W. Eaton
Subject: Octave's PATH not like Matlab's?
Date: Wed, 15 Sep 2004 21:41:01 -0400

On 15-Sep-2004, address@hidden <address@hidden> wrote:

| I noticed that Octave only recognizes the *.m, i.e. the scripts, in my
| specified paths, but not my input ascii data files. It is unlike in Matlab
| where I can do fopen("mydatafile") without the full path name as long as
| the file is in the PATH.
| 
| Is this correct?

Yes, it is intentional, because it seemed to me that looking in the
LOADPATH for files to open could easily lead to a lot of confusion and
possibly bad science if you thought you were opening one file and
happened to find another somewhere on the path.

Perhaps we should fix this for compatibility.  If we do, then I
propose that we have Octave issue a warning if the file is found on
the load path rather than by using the supplied name.

If you must find data files on the load path with the current version
of Octave, you might try using the function

  file_in_loadpath

to search for you before calling fopen.

Thanks,

jwe



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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