Vectorizing constraint


(John Wick) #1

Lets assume we have an optimization problem like this:

min_u \sum_{i = 1 }^{M} (x - u )^2

subject to,

x(k+1) = 10 x(k) , \text{ for } k = 1,2, \dots, M-1

-1 \leq u(k) \leq 1, \text{ for } k = 1,2, \dots, M

How can write the first constraint using vector notation? Hint is: x is declared as ''expression", not as a variable.
For example, in Matlab CVX, I can write the second constraint easily as using vector notation:
-1 \leq u \leq 1
But what to do for the first one?