help-octave
[Top][All Lists]
Advanced

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

Re: error with "end"


From: Daniel Heiserer
Subject: Re: error with "end"
Date: Wed, 15 Sep 1999 07:31:41 +0200

address@hidden wrote:
> 
> why does octave continually give me an error with the code...
> 
> "b = reshape(x,s(n+1:end));"
>                        ^
> specifically octave tells me that
> "parse error near lin 16 of file..."
> 
> its has to do with "n+1:end" anyone know why this doesnt work? im trying to
> port all my matlab code to octave, and i need this function to be working by
> tommrow morning. thanks.

Bad timing!
Write a perl script, which parses all your scripts
changing end to END (for later compatibility reasons)
and insert a line before each "end" usage defining
the "END":

"b = reshape(x,s(n+1:end));"
becomes
"END=length(s);b = reshape(x,s(n+1:END));"

Probably you are unlucky with something like "a(end,end)"
and other "incompatibility" things.

Maybe the "end" is already available in the 2.1.x releases?

daniel



---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------



reply via email to

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