help-octave
[Top][All Lists]
Advanced

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

Re: The parse error on the "x"


From: marco atzeri
Subject: Re: The parse error on the "x"
Date: Sat, 02 Feb 2013 14:10:42 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

On 2/2/2013 1:31 PM, Andreas Weber wrote:
Am 02.02.2013 13:23, schrieb marco atzeri:
"source dif.m"
produces no warning, no need of additional trick.

Hi Marco, I had not seen a post from Taban where he calls his script
with "source".

he should use source to run a command file, without any constrain
on file name and content (IMHO)

http://www.gnu.org/software/octave/doc/interpreter/Script-Files.html#Script-Files

How can you explain the syntax error on >>> first = 2;
if he calls his script with "source"?

I see no error on "first=2;"

$ cat dif.m
function y = f (x,t)
y = 5-2*x;
endfunction
first = 2;
t = linspace(0,20,100);
s = lsode("f",first,t);
plot(t,s,"r-")

octave:1> source dif.m
octave:2>
(and the plot is done)


Regards, Andy
Regards Marco




reply via email to

[Prev in Thread] Current Thread [Next in Thread]