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 13:23:45 +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:10 PM, Andreas Weber wrote:
Am 02.02.2013 13:01, schrieb marco atzeri:
Taban,
try this way:

function y = f (x,t)
y = 5-2*x;
endfunction
first = 2;
...

Hi Marco, see my post.
I think his big problem was, that he made a script called dif.m and the
first line was "function y = f (x,t). He then gets a message:

warning: function name 'f' does not agree with function file name
'..../dif.m'
parse error near line 5 of file /home/andy/temp/Taban.m

   syntax error

first = 2;

But he only posted the last 2 lines here. As you know you can add a 1;
as first line to overcome this.

Regards, Andy

Hi Andy

"source dif.m"
produces no warning, no need of additional trick.

Regards
Marco




reply via email to

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