constraints in a fitness function in MATLAB -


i need optimize weights in fitness function:

f(x)=x(1)*a+x(2)*b+x(3)*c+x(4)*d; 

(where a,b,c,d numeral constants , x vector of 4 weights)

and need define these simple constraints in function:

each weight (x(i)) must between 0 , 1;

and

sum (x(i))=1; (i=1:4)

could me please?

assuming have optimization toolbox,

x= linprog([a,b,c,d],[],[],[1 1 1 1],1,[0 0 0 0],[1,1,1,1]); 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -