%% Solve an MILP with Nondefault Options
% Solve the problem
%  \mathop {\min }\limits_x \left( { - 3{x_1} - 2{x_2} - {x_3}} \right)
% {\rm{\ subject\ to }}\left\{ {\begin{array}{*{20}{l}}
% {{x_3}{\rm{\ binary}}}\\
% {{x_1},{x_2} \ge 0}\\
% {{x_1} + {x_2} + {x_3} \le 7}\\
% {4{x_1} + 2{x_2} + {x_3} = 12}
% \end{array}} \right.
% without showing iterative display.
% Specify the solver inputs.

f = [-3;-2;-1];
intcon = 3;
A = [1,1,1];
b = 7;
Aeq = [4,2,1];
beq = 12;
lb = zeros(3,1);
ub = [Inf;Inf;1]; % enforces x(3) is binary
x0 = [];

%
% Specify no display.

options = optimoptions('intlinprog','Display','off');

%
% Run the solver.

x = intlinprog(f,intcon,A,b,Aeq,beq,lb,ub,x0,options)

% Copyright 2012 The MathWorks, Inc.