Suppose that I would like to optimize a fitness function
fun = @(x) (x(1)) +(x(2)*100);
based on some values for X(1) and X(2)
x(1)=(PSNR4+PSNR3+PSNR2+PSNR1)/4;
x(2)=(1-ratio4)+(1-ratio3)+(1-ratio2)+(1-ratio1)/4;
where all PSNR1 to PSNR4 and ratio1 to ratio4 are real values as seen in Figure.
I have written the following matlab code to do it but it does not work. How can I do it in MATLAB?
fun = @(x) (x(1)) +(x(2)*100);
x = ga(fun,2)