help-octave
[Top][All Lists]
Advanced

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

Re: Where and how to run scripts


From: Geordie McBain
Subject: Re: Where and how to run scripts
Date: Wed, 23 Feb 2005 14:03:53 -0500
User-agent: Mutt/1.5.6+20040907i

On Tue, Feb 22, 2005 at 06:30:50PM -0800, address@hidden wrote:
> I have installed Octave-2.1.57 on a  Macintosh OSX
>  10.3.8.  I wish to use programs from Auditory
>  Toolbox
>  by Malcolm Slaney.  I am a complete Unix newbie.  I
>  need to know where to place the ?M? files and
>  complied
>  ?Mex? files.  The names of the directories and where
>  located in relation to /usr/local/bin would be
>  helpful.  Also what procedure  and terms need to be
> done for
>  ?LOADPATH??
>  
>  Thanks
>  
>  Allan

Hello.  I don't know anything about Macs, but what does the path
function return?  Does that give any clues?  On my (Debian Linux
Intel) machine:

  octave> path ()

  Octave's search path contains the following directories:

    .
    /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> 

The dot (first in the list) means the current working directory, but I
don't know if Macs have such a thing.  You can get the internal
representation of the path by using a return value:

  octave> p = path ()
  p = 
.:/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> 

It's a colon-separated list of directories with terminal
double-slashes for directories to be searched recursively.  Looking at
what output you get might give you the idea of how to add to it.  Here, if I 
wanted to append, but not recursively, the directory /tmp/mfuncs, I'd do:

  octave> path (path (), "/tmp/mfuncs/")
  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//:/tmp/mfuncs/
  octave> 

Type help path for more info.

Geordie McBain
www.aeromech.usyd.edu.au/~mcbain



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