# genetic_plot_test
## genetic_opt_test
fx=@(x)1.0+cos(pi*(x(1)-3.0))*cos(2.0*pi*(x(2)-2.0))/(1.0+(x(1)-3.0)*(x(1)-3.0)+(x(2)-2.0)*(x(2)-2.0));
N=64; ##number of digits in binary genes
POPSIZE=500; ##population size
MAXGENS=100; ##maximum number of generations
NVARS=2; ##number of variables (member of genes in genome
PXOVER=0.2; ##probability of crossover
PMUTATION=0.01; ##probability of mutation
xmin=[-1,1];
xmax=[5,5];
%%[x y]=genetic_opt(POPSIZE,MAXGENS,NVARS,PXOVER,PMUTATION,fx,xmin,xmax);
%%x
%%y
Nx=[50 50];
title='f(x)';
label=['x' 'y' 'z'];
plot3Df(fx,xmin,xmax,Nx,title,label,0);