From help-octave-request at bevo dot che dot wisc dot edu Thu Sep 11 12:08:19 2003 Subject: Re: path From: Etienne Grossmann To: Joerg Schreiber Cc: Etienne Grossmann , help-octave@bevo.che.wisc.edu Date: Thu, 11 Sep 2003 17:49:06 +0100 Hello, ====================================================================== octave:3> help path path is the user-defined function from the file /usr/local/share/octave/2.1.50/m/miscellaneous/path.m - Function File: path (...) Modify or display Octave's `LOADPATH'. If NARGIN and NARGOUT are zero, display the elements of Octave's `LOADPATH' in an easy to read format. If NARGIN is zero and nargout is greater than zero, return the current value of `LOADPATH'. If NARGIN is greater than zero, concatenate the arguments, separating them with `":"'. Set `LOADPATH' to the result and also return it. No checks are made for duplicate elements. ====================================================================== With octave-forge, you also get addpath(), rmpath() : ====================================================================== octave:4> help addpath addpath is the user-defined function from the file /home/etienne/prog/octave/octave-forge/octave-forge/main/path/addpath.m addpath(dir1,...) Prepends dir1,... to the current LOADPATH. addpath(dir1,'-end',dir2,'-begin',dir3,'-END',dir4,'-BEGIN',dir5) Prepends dir1, dir3 and dir5 and appends dir2 and dir4. For m****b compat. BUG : Can't add directories called '-END', '-end', '-BEGIN' or '-begin' Can't add directories that are not readable by their owner FEATURE : Won't add a string that is not a dir. octave:5> help rmpath rmpath is the user-defined function from the file /home/etienne/prog/octave/octave-forge/octave-forge/main/path/rmpath.m rmpath(dir1,...) Removes dir1,... from the current LOADPATH. For m****b compat. ====================================================================== Hth, Etienne On Thu, Sep 11, 2003 at 04:51:10AM -0500, Joerg Schreiber wrote: # Hi, # # how do I set my path for octave correctly? (debian linux) # when I try, following happens: # # octave:1> path # # LOADPATH contains the following directories: # # /usr/local/share/octave/site-m// # # # octave:2> path /usr/local/share/octave # error: `usr' undefined near line 2 column 8 # error: evaluating binary operator `/' near line 2, column 7 # error: evaluating binary operator `/' near line 2, column 11 # error: evaluating binary operator `/' near line 2, column 17 # error: evaluating binary operator `/' near line 2, column 23 # octave:2> # # # after: # # octave:2> path '/home/jsch' # # no error-message is displayed, my xterm deletes the display and shows # only: # # octave:2> # # in the first line. # # the same after: # # octave:2> path /home/jsch # # # # regards, Jörg # # # # # # # # # # # # # # # # # ------------------------------------------------------------- # 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 # ------------------------------------------------------------- # -- Etienne Grossmann ------ http://www.isr.ist.utl.pt/~etienne ------------------------------------------------------------- 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 -------------------------------------------------------------