startupcvx   % personal startup command to add correct paths
%More involved example
A = randn(5);
A = A'*A
cvx_begin
variable X(5, 5) symmetric;
variable y;
minimize(norm(X) - 10*sqrt(y))
subject to
X - A == semidefinite(5);
X(2,5) == 2*y;
X(3,1) >= 0.8;
y <= 4;
cvx_end
%Disciplined Convex Programming and CVX 18
format long
disp('optima')
y
X
disp('constraints')
eig(X-A)
X(2,5)-2*y
X(3,1)-0.8
echo off
diary off
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

