k=10000;
nF = sizeExR;

nm = size(G,1) + size(indices,1);
mosekYMPtime = tic;

% prm = setParams;
MAX_ITER = 150;


sdpCVXtimeMS = tic;
cvx_begin

variable v(n+1, 1);

F = G*v(1:n,1);
{[ F- exR; sqrt(k)*(v(indices) - exV(indices))], v(n+1,1)} == lorentz(nm);
for i=1:nF
    curR = [exR(9*i-8) exR(9*i-7) exR(9*i-6);exR(9*i-5) exR(9*i-4) exR(9*i-3);exR(9*i-2) exR(9*i-1) exR(9*i)];
    curF = [F(9*i-8) F(9*i-7) F(9*i-6);F(9*i-5) F(9*i-4) F(9*i-3);F(9*i-2) F(9*i-1) F(9*i)];    
    curR'*curF+curF'*curR == semidefinite(3);
end
sdpCVXtimeM  = toc(sdpCVXtimeMS);

sdpCVXtimeSS = tic;
minimize( v(n+1,1) );
cvx_end
sdpCVXtimeS  = toc(sdpCVXtimeSS);

fprintf('cvx+mosek modeling time = %f\n',sdpCVXtimeM);
fprintf('cvx+mosek solving time = %f\n',sdpCVXtimeS);



v_value=v(1:n,1);
optiX = reshape(v_value, [3,nVt])';
write2obj3d(optiX, FList, 'MosekM.obj');
