[Top][All Lists]

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

error with "end"

From: Adam Balgach
Subject: error with "end"
Date: Tue, 14 Sep 1999 15:52:54 -0500

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.

(the code comes from Matlabs "shiftdim.m"...
 if (n > 0)
    n = rem(n-1,ndims(x))+1;
    if (isequal(siz(1:n),ones(1,n)))
      s = [siz ones(1,n+2-length(siz))];
      b = reshape(x,s(n+1:end));

adam balgach

Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see
Instructions for unsubscribing:

reply via email to

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