% Basic 

% Define variables
x = sdpvar(1,1);

% Define constraints 
Constraints = [ x<= 10, x>=1];

% Define an objective
Objective = 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)
 
 %alternatively
 %solution = value(x);
 %display(solution);
else
 display('Hmm, something went wrong!');
 sol.info
 yalmiperror(sol.problem)
end