## genetic_opt_test1
fx=@(x)21.5+x(1)*sin(4.0*x(1))+x(2)*sin(20.0*pi*x(2));
N=64; ##number of digits in binary genes
POPSIZE=100; ##population size
MAXGENS=30; ##maximum number of generations
NVARS=2; ##number of variables (member of genes in genome
PXOVER=0.3; ##probability of crossover
PMUTATION=0.02; ##probability of mutation
xmin=[-3 4.1];
xmax=[12.1 5.8];
[x y]=genetic_opt(POPSIZE,MAXGENS,NVARS,PXOVER,PMUTATION,fx,xmin,xmax);
x
y