Section 4.5.4: Frobenius norm diagonal scaling (GP)
rs = randn( 'state' );
randn( 'state', 0 );
n = 4;
M = randn(n,n);
cvx_begin gp
variable d(n)
minimize( sqrt( sum( sum( diag(d.^2)*(M.^2)*diag(d.^-2) ) ) ) )
cvx_end
D = diag(d);
disp('The matrix D that minimizes ||DMD^{-1}||_F is: ');
disp(D);
disp('The minimium Frobenius norm achieved is: ');
disp(norm(D*M*inv(D),'fro'));
disp('while the Frobunius norm of the original matrix M is: ');
disp(norm(M,'fro'));
Successive approximation method to be employed.
SDPT3 will be called several times to refine the solution.
Original size: 48 variables, 20 equality constraints
For improved efficiency, SDPT3 is solving the dual problem.
Approximation size: 177 variables, 100 equality constraints
-----------------------------------------------------------------
Target Conic Solver
Precision Error Status
---------------------------
1.221e-04 4.080e+00 Solved
1.221e-04 5.356e-02 Solved
1.221e-04 0.000e+00 Solved
1.490e-08 3.272e-05 Solved
1.490e-08 0.000e+00 Solved
-----------------------------------------------------------------
Status: Solved
Optimal value (cvx_optval): +3.25231
The matrix D that minimizes ||DMD^{-1}||_F is:
0.3010 0 0 0
0 0.2527 0 0
0 0 0.2697 0
0 0 0 0.4505
The minimium Frobenius norm achieved is:
3.2523
while the Frobunius norm of the original matrix M is:
3.6126