help-octave
[Top][All Lists]
Advanced

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

Re: Why the parse error?


From: Ben Abbott
Subject: Re: Why the parse error?
Date: Tue, 05 Feb 2013 11:29:51 -0500

On Feb 5, 2013, at 11:25 AM, Vic Norton wrote:

> What's the parse error here?
> 
> octave> [0; rand (1, 1)]
> parse error:
> 
>  syntax error
> 
>>>> [0; rand (1, 1)]
>                 ^
> 
> (the circumflex accent should be under the second one)

In this context the space after "rand" is a delimiter.  Try ....

        [0; rand(1, 1)]

or place "rand (1, 1)" in a different context.  For example ...

        [0; (rand (1, 1))]

Ben



reply via email to

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