where X is a matrix of N by M, and n is the row index, so Xn denotes the n-th row of X. g() denotes the hyperbolic tangent function (tanh). Since the X is optimized iteratively, so the value being not relevant to X is calculated out of the {cvx_begin…cvx_end} and passed in the {cvx_begin…cvx_end} as constants (constant vectors). The problem is how can I express the square of norms of each row of X? The code is as follows:

Thank you very much! It works! But the optimization seems to be very slow and making it unappropriate for the iterative scheme. I wonder the main reasons affecting the efficiency of CVX. I used the embedded solver SDPT3 here. Will a commercial solver, say mosek, performs better?
p.s. Is there a handbook introducing functions specified for the cvx but not defined in MATLAB? Just like the help documentation in MATLAB.

In some cases, more details are available, especially on argument restrictions, using the help command, even for built-in MATLAB functions which have been extended for cvx variable or expression arguments.

For instance:

help cvx/norm

Disciplined convex programming information:
norm is convex, except when P<1, so an error will result if
these non-convex "norms" are used within CVX expressions. norm
is nonmonotonic, so its input must be affine.