help-octave
[Top][All Lists]
Advanced

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

script failure with 2.1.50


From: John W. Eaton
Subject: script failure with 2.1.50
Date: Tue, 17 Feb 2004 09:41:41 -0600

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



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