Matrix(Empty matrix) = value

The part that makes sense for me is:

ans =

cvx log-convex expression (1x2 vector)

ans =

cvx log-convex expression (scalar)

ans =

cvx empty expression (1x0 vector)

The part which doesn’t is:

ans =

cvx positive constant expression (scalar)

and:

value1(2) == 1

ans =

 1

since when u = 2, c is an empty matrix as obvious even in the command window how is the product of value(2,emptyMatrix) = 1 ?!

The value of prod applied to any empty vector is 1. That’s true outside of CVX too.

1 Like

perfect, thanks I was making sure it’s not sth wrong with my code