How can I write this subjection in CVX

image
x is a vector having n dimensions,it is a variable

Start by reading the CVX Users’ Guide http://cvxr.com/cvx/doc/. You are expected to put in some effort before asking for help on this forum.