How to write the constraint attached in cvx matlab

constraint

If that is affine, it is straightforward, and is doable by any of the methods described in Semidefinite programming mode — CVX Users' Guide .

if it is not affine, then it is not convex, unless it can be transformed to an affine problem.

But you haven’t told us what symbols are. Which are input data? Which are optimization variables or expressions (functions) of optimization variables?

the variables are defined as following:
beta, t, W1 and W2 are the optimization variables.
g is input data

What about H2? if it is input data, it is straightforward to enter in CVX, per the link in my previous post. if it is not input data, that is a BMI (or worse if H2 is some nonlinear expression of the input variables), and hence not convex, and not enterable in CVX.