how to use the objective function minimize te in quadprog
Mostra commenti meno recenti
I would like to make sure if this is correct
I have a set of initial weights [10x1] - w0 covariance matrix [10x10] - myCov
f = -w0'*myCov
[solution, fval, exitflag,output] = quadProg(mycovNew.data, f, A_le,b_le,Aeq,beq,zeros(n,1),[],w0, options)
Is this the correct syntax if I want to minimize TE with respect to initial set of weights.
Thanks!
Risposte (1)
It's the correct syntax if the objective you're minimizing is
w.'*myCov*w/2 - w0'*myCov*w
5 Commenti
Matt J
il 23 Gen 2013
The objective is to minimize (w-w0)'myCov(w-w0)
Yes. You have it correct.
hdg D
il 23 Gen 2013
Matt J
il 23 Gen 2013
You're welcome. Be sure to close the Question (by Accept-clicking), if you have the Answer you need.
R H
il 11 Dic 2015
Hi, to minimize (w-w0)'myCov(w-w0), don't you need an additional term: w0'*myCov*w0?
Matt J
il 11 Dic 2015
The additional term is an additive constant, and therefore including/excluding it doesn't affect the optimization.
Categorie
Scopri di più su Quadratic Programming and Cone Programming in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!