Hello , everyone!

I have a problem with the “**max**” , the error and my code are both as follow:

Do you know how to deal with this problem ? thank you very much!

**Error**

`Disciplined convex programming error: Cannot perform the operation max( {concave}, {constant} )`

**My code:**

for k=1:K

r_p(k,n) = - rel_entr ( 1,1+pk(k,n) ) ;

c_p(k,n) = pk(k,n) - pk_c(k,n) ;

R(k,n) = max ( (r_p(k,n)-c_p(k,n) ) , 0 ) ;

end

for k=1:K

N <= sum ( R_p(k, : ) ); %constraint

end