Just before the line producing the error is reached, type one element, per command line, of the norm argument, and hit Enter. That should show you the dimensions of each element. They need to be conformal per the standard MATLAB rules so that they can be concatenated into the argument for norm.
i’m sorry i didn’t see the message until now. i want to solve the decoding order in NOMA system. now the c1 vector is 1×3, but one element in c1 is cvx zero expression (scalar). how to remove the zero element and make c1 be a 1×2 vector?
and if the c1(1) is the zero element, can be such an error like All dimensions but the one being concatenated (1) must be equal?
If c1 is 1 by 3, then c1(2:3) is 1 by 2 and has “eliminated” c1(1). Does that answer your question? This works whether c1 is a MATLAB variable, a CVX variable, or a CVX expression.
I presume the sign of some coefficient(s) must change to make the LHS concave instead of coovex in the 3rd loop. You should examine the values of the coefficients in each loop. perhaps you need some type of safeguard to prevent this. This kind of thing (unsafeguarded changes to variables from one iteration to the next) is one of the reasons I am not a big fan of crude SCA methods instead of using a high quality safeguarded non-convex nonlinear optimizer.
For the record, I’m not a professor. Just what we call in the U.S., an ordinary Joe