% Vector

% Define variables

x = sdpvar(2,1);

% Define constraints 
Constraints = [ x(1)== 1, x(2) >=3];

% Define an objective
Objective = sum(x);

options = sdpsettings('verbose',1,'solver','sdpt3');

% Solve the problem
sol = optimize(Constraints,Objective,options);

% Analyze error flags
if sol.problem == 0
 % Extract and display value
 solution = value(x);
 display(solution);
 display('Objective :');
 display(value(Objective));
 % alternative way
 fprintf('obj Objective=%.2f \n', value(Objective));
else
 display('Hmm, something went wrong!');
 sol.info
 yalmiperror(sol.problem)
end