help-octave
[Top][All Lists]
Advanced

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

Trying to set LOADPATH


From: Madhusudan Singh
Subject: Trying to set LOADPATH
Date: Sat, 26 Feb 2005 23:44:26 -0500
User-agent: KMail/1.7.1

Hi

 I am trying to use the path function to set the LOADPATH to include some of 
the utilities that I have collected in a local directory 
(/home/m_singh/octave) :

"
octave:1> op=path
op 
= 
.:/usr/lib/octave/2.1.64/site/oct/i386-pc-linux-gnu//:/usr/lib/octave/site/oct/api-v12/i386-pc-linux-gnu//:/usr/lib/octave/site/oct/i386-pc-linux-gnu//:/usr/share/octave/2.1.64/site/m//:/usr/share/octave/site/api-v12/m//:/usr/share/octave/site/m//:/usr/lib/octave/2.1.64/oct/i386-pc-linux-gnu//:/usr/share/octave/2.1.64/m//:/usr/local/share/octave/site-m//:
octave:2> s="/home/m_singh/octave/"
s = /home/m_singh/octave/
octave:3> help path
octave:4> path(op,s)
ans 
= 
.:/usr/lib/octave/2.1.64/site/oct/i386-pc-linux-gnu//:/usr/lib/octave/site/oct/api-v12/i386-pc-linux-gnu//:/usr/lib/octave/site/oct/i386-pc-linux-gnu//:/usr/share/octave/2.1.64/site/m//:/usr/share/octave/site/api-v12/m//:/usr/share/octave/site/m//:/usr/lib/octave/2.1.64/oct/i386-pc-linux-gnu//:/usr/share/octave/2.1.64/m//:/usr/local/share/octave/site-m//:.:/usr/lib/octave/2.1.64/site/oct/i386-pc-linux-gnu//:/usr/lib/octave/site/oct/api-v12/i386-pc-linux-gnu//:/usr/lib/octave/site/oct/i386-pc-linux-gnu//:/usr/share/octave/2.1.64/site/m//:/usr/share/octave/site/api-v12/m//:/usr/share/octave/site/m//:/usr/lib/octave/2.1.64/oct/i386-pc-linux-gnu//:/usr/share/octave/2.1.64/m//:/home/m_singh/octave/
octave:5> path(s)
ans = /home/m_singh/octave/
octave:6> path

Octave's search path contains the following directories:

  /home/m_singh/octave/


"
Now, unlike my previous question today on this mailing list, I do not think I 
am making an error in reading the manual here. 

If I use just path(s), it overwrites the old path (as the manual implies) with 
just s. Not what I want. However, if I use path(op,s), it results in op:op:s.  
Now, I do not know how octave searches for the functions in its LOADPATH, but 
it seems to me to be at least inelegant (if not outright wasteful of search 
time) to have each standard path listed twice, before the added path.

Cutting the long description short, how do I get op:s ?

Thanks,

MS



-------------------------------------------------------------
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]