[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## genetic_algorithm

**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);
end
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 (2.0.13.90).
B.
---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL. To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------

**genetic_algorithm**,
*Bostjan JERKO* **<=**