[Top][All Lists]

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


From: Bostjan JERKO
Subject: genetic_algorithm
Date: 14 Jul 1999 09:29:33 +0200

Hello !

I'm trying to use genetic_algorithm package posted by Daniel Heiserer, but 
there are some
problems. After starting demo.m an error message appeared when using flip.m. 
The problem
seems to appear in the following part of the program:

ind = find(rand(nr,nc) <= pr);
if ~isempty(ind)    
        str(ind) = ones(length(ind),1);

AFAIK, it creates a random matrix ind of size (nr,nc), but I don't get the <= 
pr part.
After that it looks that ind is used as vector (I could be wrong of course). If 
I try
to use an option str(ind,1) it works, but only the first bit is set to one - 
and I guess
the size and place of ones should be random. 

Now to the question: Is there an error with the program or am I just using 
to old version of octave (


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]