Optimization problem is in png. And this is my matlab code.

The error is “Disciplined convex programming error:

Cannot perform the operation: {real affine} ./ {real affine}”

I think the error occurs in log term. I don’t know how to deal with this.

N=10;

cvx_clear

cvx_begin

variables k(N)

variables z(N)

```
obj=0;
for i=1:N
obj = obj + k(i)*log(1+z(i)/k(i)) -z(i);
end
maximize obj
subject to
k_sum=0;
for i=1:N
k_sum = k_sum + k(i);
end
k_sum <= 1;
for i=1:N
k(i)>=0;
z(i)>=0;
end
```

cvx_end