[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Octave not recognizing my functions on first pass
From: |
Bill Kreamer |
Subject: |
Octave not recognizing my functions on first pass |
Date: |
Sat, 13 Dec 2003 09:31:50 -0500 |
I have Octave 2.0.16 installed on Linux, and also Octave 2.1.31 installed on
Windows.
In the /usr/share/octave/(version)/m directory I created a subdirectory
named kreamer to keep my script and function files separate from scripts in
the Octave distribution.
As an example, I have a function file named is_prime.m in my directory.
Apart from comment lines, the first line of the file is function y =
is_prime (x)
The problem occurs in two forms, depending on the platform.
Linux: When I launch Octave and do "y = is_prime(11)", I get the error
message:
'is_prime' is undefined near line 3 column 5
If I quit Octave and launch it again, the function operates correctly.
Windows: When I launch Octave and do "y = is_prime(11)", I get the
following:
warning: function 'is_prime' defined within script file
'usr/share/octave/2.1.31/m/kreamer/is_prime.m'
error: can't perform indexing operations for <unknown type> type
error: evaluating assignment near line 1 column 3
If I do "y = is_prime(11)" a second time, the function works correctly.
Is there some way to have Octave treat the kreamer subdirectory the same as
the others in the m directory.
-------------------------------------------------------------
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
-------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Octave not recognizing my functions on first pass,
Bill Kreamer <=