help-octave
[Top][All Lists]
Advanced

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

Re: mutate=rand([size(newpop,1)1]) < q this looks right but I keep getti


From: Przemek Klosowski
Subject: Re: mutate=rand([size(newpop,1)1]) < q this looks right but I keep getting a parse error
Date: Wed, 9 Mar 2016 08:55:35 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 03/08/2016 09:24 PM, naryana.shankara wrote:
Usually when I get an error its something stupid like mismatched brackets or
wrong punctuation.
I getting a parse error here is my code (offending line between spaces and
mutate=rand([size(newpop,1)1]) < q %probability of mutation occuring use
You use this phrase size(newpop,1)1  three times in your code, and it just doesn't make sense syntactically: size(..) returns a number, and you just can't follow this with a naked '1'.  You probably want rand(size(newpop,1),1)



reply via email to

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