How to write if in cvx?

I’m trying to add a constraints of Piecewise function,
such as:
Ri[n] − ci[n]) ≥ η;
Rj[n] ≤ ci[n],∀(j not equal to i)

Can i write it directly?
for i=1:k
for j=1:k
if j~=i

You can use your “write it directly” construct. As to whether that implements your piecewise function constraints, I am not clear on what those constraints are.