You are violating CVX’s DCP rules by multiplying variables in w_comb by the variable (elements in) x. This is recognized by CVX as an indefinite quadratic form which is neither convex nor concave, hence the somewhat cryptic error message.
Thank you very much!
Is there a way that I could re-formulate the obj. so that it would fit within DCP’s rules?
For instance, I think that w_comb can be written as a constraint: w_comb = V*a where the column entries of the matrix V would be the vectors v1,v2 and a would be a column vector of [a1,a2]'?
Any alternatives would be much appreciated. Thank you.
If the weighting factors a1 and a2 were fixed (i.e., input data rather than CVX variables), then this would be a Linear Programming problem. The same holds if x were fixed and a1 and `a2 were allowed to be variables.
Because of the equality constraint a1 + a2 == 1, you could solve a series of problems, one problem for each value of a1 from 0 by 0.01 (or whatever) to 1, then fix a1 and the corresponding value of a2, and solve the CVX problem. Then pick the best solution from among these problems.