But I got this error
Warning: A non-empty cvx problem already exists in this scope.
It is being overwritten.
In cvxprob (line 28)
In cvx_begin (line 41)
Error using cvx/log (line 64)
Disciplined convex programming error:
Illegal operation: log( {convex} ).
How can I sort this out?
Kind regards,
yunus
The simplified problem is
cvx_begin quiet
variable wy(20,1)
maximize log(wyâ*wy)
subject to
power(2,norm(wy(1:4),2))<= EHp
cvx_end
where EHp is a constant.
Welcome to the forum!!
For dimension 2 or greater, that objective is neither convex nor concave, hence is not allowed in CVX.
Let wy
be 2 by 1 (and h = 1). The objective is log(wy(1)^2+wy(2)^2)
. Its Hessian evaluated at w(1) = w(2) = 1
has eigenvalues of -1
and 1
. QED.
1 Like
yunusdursu
(Yunus Dursun)
5
Many thanks for your time and clear answer!
Kind regards