help-octave
[Top][All Lists]
Advanced

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

Unexpected syntax error in Octave 3.2.2


From: Bård Skaflestad
Subject: Unexpected syntax error in Octave 3.2.2
Date: Mon, 26 Apr 2010 11:28:12 +0200

Dear Octave,

I have installed

        octave:37> ver
        ----------------------------------------------------------------------
        GNU Octave Version 3.2.2
        GNU Octave License: GNU General Public License
        Operating System: Linux 2.6.31-20-generic #58-Ubuntu SMP Fri Mar
        12 04:38:19 UTC 2010 x86_64
        ----------------------------------------------------------------------
        no packages installed.
        
and observe the following unexpected syntax error

        octave:38> [reshape (1:5, [], 1); -1]
        parse error:
        
          syntax error
        
        >>> [reshape (1:5, [], 1); -1]
                           ^

This appears to be an error in the Octave parser as That Other Software
yields the expected output, [1; 2; 3; 4; 5; -1].  I should note that
replacing the implicit [vert]cat call with an explict call such as

        vertcat(reshape (1:5, [], 1), -1)

or

        cat(1, reshape (1:5, [], 1), -1)

makes the call succeed.  Is this error also present in more recent
editions of Octave?


Best regards,
-- 
Bård Skaflestad                           <address@hidden>
SINTEF ICT, Applied mathematics




reply via email to

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