Optimization through iteration - help!
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm desperatley trying to optimize vector x such as its sum equals one.I need this for an optimization problem which can only be solved by iteration.. Thx for any adivce
best Jan
x = [0.125,0.125,0.125,0.125];
testf = sum(x);
test1 = 1;
while abs(test1-testf)~=0
test1 = testf;
testf = sum(x*2);
end
9 Kommentare
Geoff Hayes
am 8 Mai 2015
Jan - the code never resets the weight array so you will get the same answer on each iteration of the while loop. And multiplying the weights by a number less than one will mean that
sum(weight*0.2) < sum(weight)
always since each element of weight is less than one.
Siehe auch
Kategorien
Mehr zu Third-Party Cluster Configuration finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!