help-octave
[Top][All Lists]
Advanced

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

Re: problems with debugging script in if -else command


From: bpabbott
Subject: Re: problems with debugging script in if -else command
Date: Tue, 28 Sep 2010 16:18:10 +0000 (GMT)


On Sep 28, 2010, at 11:37 AM, "address@hidden" <address@hidden> wrote:

I am trying to get an if - else command to work, but am told of a syntax error at the else statement. (script attached.)

I have not found the help or doc files to be enough. Any hints?

Brian
 
The part below won't work

If (M(n+1,2) > M(n,2))
pr=1;
else(if (M(n+1,2)<M(n,2))
nr=1;
else ties=1
endif)
endif

I'm not sure what you're trying to do, but maybe ...

if (M(n+1,2) > M(n,2))
pr=1;
else
if (M(n+1,2)<M(n,2))
nr=1;
else
ties=1
endif
endif

Also, use "if" not "If", and "while", not "While".

Ben


reply via email to

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