help-octave
[Top][All Lists]
Advanced

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

Re: script failure with 2.1.50


From: daron
Subject: Re: script failure with 2.1.50
Date: Tue, 17 Feb 2004 10:13:10 -0600
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040206

John W. Eaton wrote:

On 17-Feb-2004, daron <address@hidden> wrote:

| Using FreeBSD 4.9 ( octave was compiled from the ports collection), this | simple script fails : | | #! /usr/local/bin/octave -q | | Ew = 1.0; | | # Generate vector of trigger periods | | Tp = linspace(100*Ew, 0.1*Ew, 2048); | | # Calculate fraction: missed events = 1 - (EventRate/TriggerRate) | | # and trigger rates | | for i = 1:length(Tp) | | f(i) = 1.0 - ((ceil(Ew/Tp(i)) - (Ew/Tp(i)))*Tp(i) + Ew)^-1/(Tp(i)^-1); | | Tr(i) = 1.0/Tp(i); | | endfor | | plot(Tr, f); | | pause(); | | The error message is : | | ./ideal.m: line 4: Ew: command not found
| ./ideal.m: line 7: syntax error near unexpected token `('
| ./ideal.m: line 7: `Tp = linspace(100*Ew, 0.1*Ew, 2048);'
| | Could someone please shed some light on a possible cause/fix ? The | script works fine with an older octave version ( 2.1.34, I believe ) on | a Linux machine.

Those don't look like Octave error messages, so I think something
other than Octave is trying to run the script.  Perhaps your command
shell?

Where is Octave installed?  Is it in /usr/local/bin or some other
directory?  If it is not in /usr/local/bin, then you need to modify
the first line of your script.

(Sorry about the double posting of your message.  I forwarded it to
the list before I noticed that you had subscribed and reposted it.)

jwe

Thanks for the prompt replies, folks. The "/usr/local/bin/octave" path is correct.

It appears that a shell is trying to interpret the script ( either my shell, bash, or the system shell, sh ), rather than invoking octave to run it. This is v. strange, as I have ran awk scripts in the past without a problem.

BTW -- trying to run the script as root ( whose shell is csh ) results in similar errors:

# ./ideal.m

Ew: Command not found.

Badly placed ()'s.


If nobody has further suggestions, I will look into this as a *BSD/shell problem.

-- dc



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