# Reciprocal of a variable:1/x

In CVX, I defined a variable Psii_ini(the scope of Psii_ini >=0, but not declared in the program), for 1/Psii_ini in the constraint, I use inv_pos(Psii_ini), but the following error, may I ask what happened?

My code:
variable s(NL,1) complex
variable sigma(1,1)
variable Psii(1,1)

``````    Psii_ini=s*s';
sigma_ini=((g_c'*w_ini+t'*s)*(g_c'*w_ini+t'*s)')*inv_pos(Psii_ini)+1;
``````

CVX reported errors：
Incorrect use of cvx/pow_cvx (line 144)
Disciplined convex programming error:
Illegal operation: pow_p( {convex}, {-1} )
Error cvx/inv_pos (line 5)
y = pow_cvx( x, -1, ‘pow_p’ );

The argument of `inv_pos` needs to be concave (affine is a special case of concave). Actually, not only is `s*s'` not concave, it’s an n by n matrix, not a scalar. Did you mean `Psii_ini=s'*s;` ?

help inv_pos

inv_pos Reciprocal of a positive quantity.
inv_pos(X) returns 1./X if X is positive, and +Inf otherwise.
X must be real.

`````` For matrices and N-D arrays, the function is applied to each element.

Disciplined convex programming information:
inv_pos is convex and nonincreasing; therefore, when used in CVX
specifications, its argument must be concave (or affine).
``````

Thanks, there are some mistakes in my code. Thanks for your reply, I will check again