Thank you for your reply.

I rewrote the code and used two solvers. The MOSEK solver gives the value while SDPT3 does not.

cvx_begin

cvx_solver mosek

variables rho(4,1) y(2,1) x(2,1) z(1)

minimize (z)

```
rho'*mean_c + sqrt( p0/(1-p0) )*norm( covariance_c_sqrt*rho ) <= z,
0.5*y(1)*log(p1) - 0.5*log(1-x(1)) + log(V1) <= log(ub1 - rho'*mean_d1);
0.5*y(2)*log(p1) - 0.5*log(1-x(2)) + log(V2) <= log(ub2 - rho'*mean_d2);
y(1)*log(p1) <= log(x(1));
y(2)*log(p1) <= log(x(2));
y(1) + y(2) == 1,
y >= 0;
rho >= 0;
rho'*A == (1-a)*b;
```

cvx_end

##
Calling Mosek 9.1.9: 31 variables, 10 equality constraints

For improved efficiency, Mosek is solving the dual problem.

MOSEK Version 9.1.9 (Build date: 2019-11-21 11:34:40)

Copyright (c) MOSEK ApS, Denmark. WWW: mosek.com

Platform: Windows/64-X86

Problem

Name :

Objective sense : min

Type : CONIC (conic optimization problem)

Constraints : 10

Cones : 7

Scalar variables : 31

Matrix variables : 0

Integer variables : 0

Optimizer started.

Presolve started.

Linear dependency checker started.

Linear dependency checker terminated.

Eliminator started.

Freed constraints in eliminator : 2

Eliminator terminated.

Eliminator started.

Freed constraints in eliminator : 0

Eliminator terminated.

Eliminator - tries : 2 time : 0.00

Lin. dep. - tries : 1 time : 0.00

Lin. dep. - number : 0

Presolve terminated. Time: 0.00

Problem

Name :

Objective sense : min

Type : CONIC (conic optimization problem)

Constraints : 10

Cones : 7

Scalar variables : 31

Matrix variables : 0

Integer variables : 0

Optimizer - threads : 12

Optimizer - solved problem : the primal

Optimizer - Constraints : 7

Optimizer - Cones : 7

Optimizer - Scalar variables : 29 conic : 23

Optimizer - Semi-definite variables: 0 scalarized : 0

Factor - setup time : 0.00 dense det. time : 0.00

Factor - ML order time : 0.00 GP order time : 0.00

Factor - nonzeros before factor : 18 after factor : 19

Factor - dense dim. : 0 flops : 2.87e+02

ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME

0 6.9e+00 5.0e+00 1.9e+01 0.00e+00 1.481043233e+01 -3.000000000e+00 1.0e+00 0.00

1 2.6e+00 1.9e+00 6.7e+00 -2.33e-01 2.637733647e+00 -7.517742550e+00 3.9e-01 0.00

2 4.6e-01 3.3e-01 6.1e-01 4.16e-01 -1.204365302e+01 -1.424654918e+01 6.7e-02 0.00

3 9.1e-02 6.6e-02 5.1e-02 9.39e-01 -1.559793015e+01 -1.604148726e+01 1.3e-02 0.00

4 3.4e-02 2.5e-02 1.5e-02 8.26e-01 -1.611210768e+01 -1.630711868e+01 5.0e-03 0.00

5 7.5e-03 5.4e-03 2.1e-03 7.11e-01 -1.640435272e+01 -1.645459867e+01 1.1e-03 0.00

6 1.6e-03 1.1e-03 6.8e-04 1.85e-02 -1.649961733e+01 -1.651707211e+01 2.3e-04 0.00

7 7.1e-04 5.1e-04 3.2e-04 -4.98e-01 -1.669840670e+01 -1.670145038e+01 1.0e-04 0.00

8 2.6e-04 1.9e-04 8.3e-05 4.80e-01 -1.695143068e+01 -1.695115939e+01 3.7e-05 0.00

9 4.3e-05 3.1e-05 6.0e-06 7.66e-01 -1.711252919e+01 -1.711249572e+01 6.3e-06 0.00

10 1.4e-05 1.0e-05 1.2e-06 8.93e-01 -1.714181523e+01 -1.714173518e+01 2.0e-06 0.00

11 2.1e-07 1.6e-07 2.2e-09 9.88e-01 -1.715476387e+01 -1.715476358e+01 3.1e-08 0.00

12 5.3e-09 3.9e-09 8.5e-12 1.00e+00 -1.715497572e+01 -1.715497572e+01 7.8e-10 0.00

Optimizer terminated. Time: 0.00

Interior-point solution summary

Problem status : PRIMAL_AND_DUAL_FEASIBLE

Solution status : OPTIMAL

Primal. obj: -1.7154975718e+01 nrm: 1e+02 Viol. con: 5e-07 var: 0e+00 cones: 0e+00

Dual. obj: -1.7154975907e+01 nrm: 6e+00 Viol. con: 0e+00 var: 9e-08 cones: 0e+00

Optimizer summary

Optimizer - time: 0.00

Interior-point - iterations : 12 time: 0.00

Basis identification - time: 0.00

Primal - iterations : 0 time: 0.00

Dual - iterations : 0 time: 0.00

Clean primal - iterations : 0 time: 0.00

Clean dual - iterations : 0 time: 0.00

Simplex - time: 0.00

Primal simplex - iterations : 0 time: 0.00

Dual simplex - iterations : 0 time: 0.00

Mixed integer - relaxations: 0 time: 0.00

Status: Solved

Optimal value (cvx_optval): +17.155

cvx_begin

cvx_solver sdpt3

variables rho(4,1) y(2,1) x(2,1) z(1)

minimize (z)

```
rho'*mean_c + sqrt( p0/(1-p0) )*norm( covariance_c_sqrt*rho ) <= z,
0.5*y(1)*log(p1) - 0.5*log(1-x(1)) + log(V1) <= log(ub1 - rho'*mean_d1);
0.5*y(2)*log(p1) - 0.5*log(1-x(2)) + log(V2) <= log(ub2 - rho'*mean_d2);
y(1)*log(p1) <= log(x(1));
y(2)*log(p1) <= log(x(2));
y(1) + y(2) == 1,
y >= 0;
rho >= 0;
rho'*A == (1-a)*b;
```

cvx_end

##
Successive approximation method to be employed.

For improved efficiency, SDPT3 is solving the dual problem.

SDPT3 will be called several times to refine the solution.

Original size: 31 variables, 10 equality constraints

6 exponentials add 48 variables, 30 equality constraints

Cones | Errors |

Mov/Act | Centering Exp cone Poly cone | Status

--------±--------------------------------±--------

Check for incorrect argument data type or missing argument in call to function ‘vec’.

Error in cvxprob/solve (line 250)

Anew2 = Anew * diag(sparse(vec(amult(orow,:))));

Error in cvx_end (line 88)

solve( prob );

As suggested in here, I have CVX directories above that of YALMIP.

Could you please suggest if there is any problem with my code or else how do I remove the error?