help-octave
[Top][All Lists]
Advanced

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

Re: how octave loads different functions with the same file name


From: avraham
Subject: Re: how octave loads different functions with the same file name
Date: Sat, 4 Jun 2005 07:05:07 +0300
User-agent: Mutt/1.5.5.1+cvs20040105i

On Fri, Jun 03, 2005 at 05:00:52PM -0700, Paul Roberts wrote:
> Hello, I'm new to octave ( coming from matlab). I have installed
> octave and octave-forge
> 
> I noticed that when I type: help plot from the command line, i get the
> help for the file:
> 
> $OCTAVE/site/m/octave-forge-alternatives/m/graceplot/plot.m
> 
> rather then:
> 
> $OCTAVE/2.1.69/m/plot/plot.m
> 
> I am wondering how I can control which function get loaded in octave
> when there are two functions of the same name in the search path.
> 
> Thanks,
> 
> paul
> 
> 
> 
> -------------------------------------------------------------
> 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
> -------------------------------------------------------------
Hi,
As far as I know, unless toggled by some switch, as mentioned by
J. Koski for the present case, the function is chosen according
to the place of its directory in the path variable. My policy
in such cases is to copy the preferred version under another name
to a directory where I keep my own m files. I have to change the
name of the function in its definition, as well.

The function addpath with the option -begin may provide a better
way: Create a special directory for such cases, put it at the
head of the path list with addpath (it is best to do it in the
.octaverc file) and copy to there the preferred versions of the
functions. In this case you don't have to change the name of the
function, nor to alter its text.

The idea just occured to me. I never tried it.
Cheers, Avraham



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