Thanks a lot for replying. N is a variable, while R is a constant. When I use the pseudo code written by you, I get the following error
The following cvx variable(s) have been cleared or overwritten:
obj
This is often an indication that an equality constraint was
written with one equals '=' instead of two '=='. The model
must be rewritten before cvx can proceed.
When I change the assignment operation to two equals operators, it works! This is a little awkward for me, because I am used to using ‘=’ for assignment and ‘==’ for equality checking. Am I doing things right?