help-octave
[Top][All Lists]
Advanced

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

Re: genpath not working?


From: James Sherman Jr.
Subject: Re: genpath not working?
Date: Thu, 2 Aug 2007 14:19:55 -0400

Sorry forgot to forward the list.

---------- Forwarded message ----------
From: James Sherman Jr. <address@hidden >
Date: Aug 2, 2007 2:19 PM
Subject: Re: genpath not working?
To: "address@hidden" <address@hidden >

As far as I know, genpath doesn't actually modify your load path at all (which is what you seem to think it should do).  As I interpret it, it just returns a string with all the directories and subdirectories separated by colons(or whatever your system uses to separate directories in a path, which is returned by pathsep).  So if you wanted to add all subdirectories of your current directory to your path you could do something like:

addpath(genpath('./'));

What it should do, as you say, is what it does. ;)

James Sherman


On 8/2/07, address@hidden <address@hidden> wrote:
Hi, genpath should generate a path with input dir and its subdirs.
In the example bellow it does not work. Is this function really working?

octave-2.9.9:30> genpath('/usr/local/share/octave/2.1.73/site/m/octave-forge');
octave-2.9.9:31> which legend
which: `legend' is undefined
octave-2.9.9:32>
addpath('/usr/local/share/octave/2.1.73/site/m/octave-forge/plot');
octave-2.9.9:33> which legend
legend is the user-defined function from the file
/usr/local/share/octave/2.1.73/site/m/octave-forge/plot/legend.m

The various subdirs from
/usr/local/share/octave/2.1.73/site/m/octave-forge
also do not appear at the output of path function.
_______________________________________________
Help-octave mailing list
address@hidden
https://www.cae.wisc.edu/mailman/listinfo/help-octave


reply via email to

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