help-octave
[Top][All Lists]
Advanced

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

Re: genetic_algorithm


From: Daniel Heiserer
Subject: Re: genetic_algorithm
Date: Wed, 14 Jul 1999 12:15:59 +0200

address@hidden wrote:
> 
> 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.

Here I am. ;-)

The toolbox was a "first" release, because of many questions concerning
optimization and GA.
I have no answer right no, but use my octave rc file, then it might
work.
I will look into the problem later.

Bye     daniel

> ---------------------------------------------------------------------octave
GNU Octave, version 2.0.14 (mips-sgi-irix6.4).
Copyright (C) 1996, 1997, 1998, 1999 John W. Eaton.
This is free software with ABSOLUTELY NO WARRANTY.
For details, type `warranty'.

octave:1> demo
running ga on the hills-function
[XLB X0 XUB]  -3   0   3
  -3   0   3
Maximum number of iterations is  20.
   0.0019496   3.1814172  14.8729820
Yhist = -18.969
   5.6464e-05   5.0481e+00   1.8969e+01
Yhist =

  -18.969
and so on .....
> ---------------------------------------------------------------------
## System-wide startup file for Octave.
##
## This file should contain any commands that should be executed each
## time Octave starts for every user at this site.
# fuer gnuplot, daniel heiserer, 2.jun.1998
automatic_replot=1;
#
PAGER    = 'cat';
page_output_immediately = 1;
do_fortran_indexing=1;
implicit_str_to_num_ok = 1;
gnuplot_binary="/proj/lin56a/q127038/GNU/usr/local/bin/gnuplot";
gnuplot_has_frames=1;
gnuplot_has_multiplot=1;

-- 
Mit freundlichen Gruessen
                                 Daniel Heiserer
-----
--------------------------------------------------------------
Dipl.-Phys. Daniel Heiserer, BMW AG, Knorrstrasse 147, 80788 Muenchen
Abteilung EK-20
Tel.: 089-382-21187, Fax.: 089-382-42820
mailto:address@hidden



---------------------------------------------------------------------
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
---------------------------------------------------------------------



reply via email to

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