''Disciplined convex programming error: Illegal operation: exp( {affine} ).''


(Ali Darabi) #1

I got this error
’‘Disciplined convex programming error: Illegal operation: exp( {affine} ).’’ how can I fix it? y1 is complex and a,p are real.

cvx_begin sdp
variables a(n,1) p(n,1)
expression hh
hh=a.(exp(-1ip*pi/180));
minimize(sum_square_abs(y1-diag(hh)*ph))
cvx_end


(Mark L. Stone) #2

Disciplined convex programming information:
exp(X) is convex and nondecreasing in X. When used in CVX
expressions, X must be real. Typically, X must also be affine
or convex; X can also be concave, but this produces a log-concave
result with very limited usefulness.