I want to do sth like this:

```
cvx_begin
variables x(2,2,3)
x1=x(:,:,1);
x2=x(:,:,2);
x3=x(:,:,3);
for i=1:2
for j=1:2
y1=x1( i , j )*log2(1+x2( i , j )+x3( i , j ))
end
end
........
maximise (obj) _% I will use y1 in the obj_
subject to
x(:)>=0
sum(sum(x1)) <= 1
........
```

I tried log2(1+x2( i , j )+x3( i , j )), it’s permitted,obviously.

I believe y1 is concave but it is Invalid. with message:

Error using .* (line 53)

Disciplined convex programming error:

Invalid operation: {concave} * {real affine}

**how can I express this,**

I find “rel_entr” in other’s questions but there is only one description in the guide:

**† rel_entr(x)**

** Scalar relative entropy; rel_entr(x,y)=x.*log(x/y). Convex.**

I do not know if this can solve my problem.

Another test i tried like this

```
variables x
variables y
maximize (x*y)
subject to
x<=2
y<=2
x>=0
y>=0
```

the answer is 4,obviously. but I failed.

By the way,my last question is stupid and i want to delete it. I cann’t find the button of delete .It would be a good idea to edit it to a new quesetion but I’m afriad you will miss it.