When I ran my program, the error occurred as followed:

Error using * Inner matrix dimensions must agree

in cvxprob/eliminate (line 137)

P = P * cvx_invert_structure( xR );

in cvxprob/solve (line 18)

[ At, cones, sgn, Q, P, dualized ] = eliminate( prob, true, shim.dualize );

in cvx_end (line 88)

solve( prob );

in F_DC_RS (line 73)

cvx_end

where “F_DC_RS” is my script.

Because the complete program is consist of my functions, I can only paste the part that calls CVX toolbox.

cvx_begin

variable Q(Nt,2Nt,N,K) complexNt,i,j)));

expressions g(1) Gf(1) Psum(N) gc(N,K) fc_s(N,K) ga(N,K) fa_s(N,K) gp(N,K) Gfc Gfa Gfp

[gc,fc_s,ga,fa_s,gp,~]=F_convave_fun(K,N,Nt,Nr,H,Q,sigma2,A);

g=cvx(0);

for i=1:N

for j=1:K

g=g+min([gc(i,j)+fa_s(i,j),ga(i,j)+fc_s(i,j)])+gp(i,j);

end

end

case 1

end

[Gfc,Gfa,Gfp]=F_gradientF(K,N,Nt,Nr,H,Qpc{iter},Q,sigma2,A);

Gf=Gfc+Gfa+Gfp;

for i=1:N

Psum(i)=cvx(0);

for j=1:K

Psum(i)=Psum(i)+real(trace(Q(:,1:Nt,i,j)+Q(:,Nt+1:2

end

end

maximize g-f-Gf

subject to

for i=1:N

for j=1:K

Q(:,1:Nt,i,j)==hermitian_semidefinite(Nt);

Q(:,Nt+1:2*Nt,i,j)==hermitian_semidefinite(Nt);

end

Psum(i)<=Pb;

end

cvx_end

where g is cvx concave expression (scalar), f=42.0508 and Gf is cvx real affine expression (scalar).

**There is no error before “cvx_end”.**