Why the cvx doesn’t want to accept (1-xa)/xa?it is convex!

when i run an cvx code,the window always show me this error

Error using .* (line 173)
Disciplined convex programming error:
Cannot perform the operation: {real affine} ./ {real
affine}

Error in ./ (line 19)
z = times( x, y, ‘./’ );

Error in * (line 36)
z = feval( oper, x, y );

Error in / (line 15)
z = mtimes( x, y, ‘rdivide’ );

Error in FIRSTphase (line 69)
H1_A=2*(1-xa)/xa

Because i have checked that (1-xa)/xa is a convex,but i don’t know why the cvx doesn’t want to accept my code,should i write it as the other way? or the denominator can’t be variable when the Numerator is the variable too?

This is only convex when x >= 0; Rewrite it as 2*(1/xa - 1), which can be expressed in CVX, presuming you are willing to impose x >= 0, as 2*(inv_pos(xa) - 1)

You should read Why isn't CVX accepting my model? READ THIS FIRST!