Optimization through iteration - help!
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Geoff Hayes
il 8 Mag 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.
Vedere anche
Categorie
Scopri di più su Third-Party Cluster Configuration in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!