help-octave
[Top][All Lists]
Advanced

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

Re: new to octave - need help with running user-defined function files


From: Joe Koski
Subject: Re: new to octave - need help with running user-defined function files
Date: Mon, 06 Mar 2006 19:07:42 -0700
User-agent: Microsoft-Entourage/11.2.1.051004

on 3/6/06 6:32 PM, Theresa Bullard at address@hidden wrote:

> Dear Octave List,
> 
> I am new to Octave and have loaded everything successfully and am able
> to run built-in functions and such, but I seem to be having trouble
> with getting Octave to see and run any user-defined functions. I've
> read the online manual sections dealing with this but am not clear on a
> couple points.
> 
> 1. what is the appropriate syntax to use for changing LOADPATH once
> Octave is running?
> 
> 2. Since I haven't figured out how to add another path for Octave to
> search in for function files, I've placed the files in one of the paths
> that is already in DEFAULT_LOADPATH
> (/usr/local/share/octave/2.1.71/site/m//), and when I use the built in
> function 'file_in_loadpath(filename)' it keeps returning empty results
> for the all of the new user-defined function files I've downloaded or
> that I've created myself. Whereas if I search for octave functions in
> the same directory path it will find them. From the manual it seems
> like I can add new function or script files even while Octave is
> running and as soon as I call the new function from the command line it
> should search the directories and then compile it on the fly, if needed
> (based on time-stamp). Is this true? If so, why is it not able to see
> these new function files or script files I've put into the default
> paths? Is there a way to force compile all these functions?
> 
> Any clarification or suggestions for getting started here is much
> appreciated. I'm running Octave through X-11 in Mac OSX (10.3.9)
> 
> Thanks,
> Theresa

Theresa,

Welcome to octave. I also run OS X 10.3.9, but currently have octave 2.1.72
installed (I ran 2.1.71 in the past). LOADPATH is not usually an issue in
octave. 

First, how did you install octave: Fink, HPC, or build from source? It makes
a difference as to how you set up your .bash_profile or .bashrc to recognize
things. Do you also have octave-forge installed? That's important for extra
routines that are not in the basic octave package. If you installed from
HPC, you already have both octave and octave-forge. Do you have gnuplot and
aquaterm installed? There is an Apple .dmg download from apple.com for
gnuplot, and the latest AquaTerm is available from

  http://aquaterm.sourceforge.net/ .

What I usually do is run a Terminal window with AquaTerm available. Others
use X11 and run in an xterm. (AquaTerm is faster and simpler for basic
plots, X11 allows mouse control, but requires more effort to save plots.)
First I do a cd into the directory where my .m script resides, and type
octave. I keep a Smultron editor window open to edit and run my script (any
other text editor such as TextWrangler, emacs, etc. would work just as
well).  Once octave is started in Terminal or xterm, then do a help at the
octave prompt and octave will show what's available to use.

These are some ideas. If you're still having problems, write back with more
details.

Joe








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