My codes are
variable B(n)
expression y(n-1)
for i = 1:(n-1)
X = (B(i)*B(n)+a)/(B(n)+b)
y(i) = entr(X)
end
maximize (sum(y))
it reminds me:
Invalid quadratic forms: not a square. How can I express the above objective function? Thanks!
My codes are
variable B(n)
expression y(n-1)
for i = 1:(n-1)
X = (B(i)*B(n)+a)/(B(n)+b)
y(i) = entr(X)
end
maximize (sum(y))
it reminds me:
Invalid quadratic forms: not a square. How can I express the above objective function? Thanks!
Thank you for the reply. For CVX, can I declare two variables, one vector variable and one scalar variable? Thanks.