Optimization using ga algorithm
function y=check(x)
a=pi/3;
b=[pi/3,pi/2,pi/4];
y= -1*abs(sum(exp(1j*x*cos(a-b)))^2;
In seperate m file
lb=[0,0,0];
ub=[8,8,8];
IntCon = [1 2 3];
[x,fval] = ga(@check,3,[],[],[],[],lb,ub,[],IntCon)
i got the result. However I want to have value x(1)=0, and I want to
optimize x(2) and x(3). Could anybody provide me a way to do that?
No comments:
Post a Comment