The code

```
beta=9.0453e4;
N=11;
L=3000;
for n=1:N
x0(n,1)=300*n-300;
y0(n,1)=0;
end
k20=1000*beta*ones(N,1);
d2=(x0-L).^2+y0.^2+1e4;
d20=d2-2*x0.*(x0-L)-2*y0.^2;
d21=2*(x0-L);
d22=2*y0;
cvx_begin
variables x(N) y(N)
R2=(rel_entr(d20+d21.*x+d22.*y,k20+d20+d21.*x+d22.*y)+rel_entr(k20+d20+d21.*x+d22.*y,d20+d21.*x+d22.*y))./k20;
maximize sum(R2)
subject to
x(1)==0;
y(1)==0;
x(N)==L;
y(N)==0;
d20+d21.*x+d22.*y>=1e4;
for i=1:N-1
square(x(i+1)-x(i))+square(y(i+1)-y(i))<=1e6;
end
cvx_end
```

The output

# =====================================

Using Pade approximation for exponential

cone with parameters m=3, k=3

# =====================================

Using Pade approximation for exponential

cone with parameters m=3, k=3

error using .* (line 46)

Matrix dimensions must agree.

error ./ (line 19)

z = times( x, y, ‘./’ );

error Untitled1 (line 15)

R2=(rel_entr(d20+d21.*x+d22.*y,k20+d20+d21.*x+d22.*y)+rel_entr(k20+d20+d21.*x+d22.*y,d20+d21.*x+d22.*y))./k20;

## My cvx_version

CVX: Software for Disciplined Convex Programming ©2014 CVX Research

Version 2.1, Build 1123 (cff5298) Sun Dec 17 18:58:10 2017

Installation info:

Path: D:\Program Files\cvx

MATLAB version: 9.4 (R2018a)

OS: Windows 10 amd64 version 10.0

Java version: 1.8.0_144