How can I solve this problem:" Disciplined convex programming error: Illegal operation: exp( {affine} )"

Hello,CVX community,
I’m trying to solve the problem with cvx in the following:

variables r
variables e
expression r0
expression F(q)
expression F1(q+1)
expression temp(q)
minimize e
for n1=1:1:N
    for n2=1:1:N
subject to

But the first expression in the loop,” F(q,:)”,got this error” Disciplined convex programming error:Illegal operation: exp( {affine} ).”
How can I fix it? Any help from your guys would be appreciated.

I don’t see how that error occurred. i don’t see anything in the argument of exp which is a CVX variable or expression. Am I missing something? And I have no idea why exp(affine) would be illegal if the argument of exp were in fact affine, which it doesn’t appear to be.

There’s a similar line of code in another program that works fine, so I don’t quite understand how this error happened. Mark, do you have any suggestions to help me?Thank you very much!

Are you using CVX 3.0beta? If so, remoce all CVX directories from the MATLAB path and install CVX 2.2

cvx_version shows what version is installed.

Or try new MATLAB session, or reinstalling CVX 2.2.

I’m using CVX 2.2. And I also try new MATLAB session. Maybe I’ll have to reinstall CVX 2.2. Thanks for your suggestion.