Disciplined covex programming error while using norm()

(John Wick) #1

I am trying to write my objective function, given below:

using norms like this:

minimize {10 * norm(y-y_ref) ^2 + norm(u) ^2 }

So that I dont have to use for loop. But I am getting error. Any idea whats wrong here?

(Mark L. Stone) #2

Either use sum_square(u) or square_pos(norm(u)) . Similarly for the other term.

(Michael C. Grant) #3

CVX 3.0 beta allows constructs like norm(x)^2, but not CVX 2.1. Still, there have been some reports of remaining issues with 3.0 so I think you’re best bet is to take Mark’s advice.