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