Code to find maxima of a function using ga
Objective: function y= mkl(k) f1=(sin(5.1*pi*k(1)+.5))^6; f2=exp((-4*log(2)*(k(1)-.0667)^2))/.64; f3=(sin(5.1*pi*k(2)+.5))^6; f4=exp((-4*log(2)*(k(2)-.0667)^2))/.64; y=-(f1*f2*f3*f4); end Genetic algorithm is a process which is based on the natural selection of random things to determine the fittest. In other words it uses Darwin…